@avallon-labs/sdk 58.0.0 → 59.0.0-staging.1311

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
@@ -120,6 +120,7 @@ type PrincipalType = (typeof PrincipalType)[keyof typeof PrincipalType];
120
120
  declare const PrincipalType: {
121
121
  readonly profile: "profile";
122
122
  readonly worker: "worker";
123
+ readonly tenant: "tenant";
123
124
  };
124
125
 
125
126
  /**
@@ -130,10 +131,10 @@ declare const PrincipalType: {
130
131
  */
131
132
 
132
133
  interface AccessGrant {
133
- /** Who holds the grant: a team member's `profile`, or a `worker`, whose runs act with it. */
134
+ /** Who holds the grant: a team member's `profile`, a `worker`, whose runs act with it, or the whole `tenant`. `tenant` is not supported yet. */
134
135
  principal_type: PrincipalType;
135
136
  principal_id: string;
136
- /** `viewer` can see and use the entity. `editor` can also change and share it. On a `worker`, `viewer` sees the worker, its prompt and everything it owns, and can start it; `editor` can also edit, promote, delete and share it. Attaching secrets and managing schedules still need the matching role permission. */
137
+ /** `viewer` can see and use the entity. `editor` can also change and share it. On a `worker`, `viewer` sees the worker, its prompt and everything it owns, and can start it; `editor` can also edit, promote, delete and share it. Attaching secrets and managing schedules still need the matching role permission. On a `case_type`, `editor` can also edit, promote and share it. */
137
138
  level: AccessLevel;
138
139
  created_at: string;
139
140
  }
@@ -158,6 +159,7 @@ interface Access {
158
159
  type AccessEntityType = (typeof AccessEntityType)[keyof typeof AccessEntityType];
159
160
  declare const AccessEntityType: {
160
161
  readonly worker: "worker";
162
+ readonly case_type: "case_type";
161
163
  };
162
164
 
163
165
  /**
@@ -168,10 +170,10 @@ declare const AccessEntityType: {
168
170
  */
169
171
 
170
172
  interface AccessGrantInput {
171
- /** Who holds the grant: a team member's `profile`, or a `worker`, whose runs act with it. */
173
+ /** Who holds the grant: a team member's `profile`, a `worker`, whose runs act with it, or the whole `tenant`. `tenant` is not supported yet. */
172
174
  principal_type: PrincipalType;
173
175
  principal_id: string;
174
- /** `viewer` can see and use the entity. `editor` can also change and share it. On a `worker`, `viewer` sees the worker, its prompt and everything it owns, and can start it; `editor` can also edit, promote, delete and share it. Attaching secrets and managing schedules still need the matching role permission. */
176
+ /** `viewer` can see and use the entity. `editor` can also change and share it. On a `worker`, `viewer` sees the worker, its prompt and everything it owns, and can start it; `editor` can also edit, promote, delete and share it. Attaching secrets and managing schedules still need the matching role permission. On a `case_type`, `editor` can also edit, promote and share it. */
175
177
  level: AccessLevel;
176
178
  }
177
179
 
@@ -5630,6 +5632,8 @@ declare const EntityPermission: {
5630
5632
  readonly "workers:run": "workers:run";
5631
5633
  readonly "workers:write": "workers:write";
5632
5634
  readonly "workers:promote": "workers:promote";
5635
+ readonly "case-types:read": "case-types:read";
5636
+ readonly "case-types:write": "case-types:write";
5633
5637
  };
5634
5638
 
5635
5639
  /**
@@ -7135,7 +7139,7 @@ interface GetInformationRequestEnvelope {
7135
7139
  */
7136
7140
 
7137
7141
  interface MyAccess {
7138
- /** What the caller may do with the entity, through their role or a grant on it. On a worker, `workers:write` also lets the caller share it. */
7142
+ /** What the caller may do with the entity, through their role or a grant on it. `workers:write` on a worker and `case-types:write` on a case type also let the caller share it. */
7139
7143
  permissions: EntityPermission[];
7140
7144
  }
7141
7145
 
@@ -7289,6 +7293,8 @@ declare const ProfilePermissionsItem: {
7289
7293
  readonly "teams:write": "teams:write";
7290
7294
  readonly "cases:write": "cases:write";
7291
7295
  readonly "cases:delete": "cases:delete";
7296
+ readonly "case-types:read": "case-types:read";
7297
+ readonly "case-types:create": "case-types:create";
7292
7298
  readonly "case-types:write": "case-types:write";
7293
7299
  readonly "information-requests:write": "information-requests:write";
7294
7300
  readonly "information-requests:resolve": "information-requests:resolve";
@@ -14652,11 +14658,11 @@ type Awaited$w<O> = O extends AwaitedInput$w<infer T> ? T : never;
14652
14658
  type SecondParameter$w<T extends (...args: never) => unknown> = Parameters<T>[1];
14653
14659
  declare const getGetAccessUrl: (entityType: AccessEntityType, entityId: string) => string;
14654
14660
  /**
14655
- * List who an entity is shared with. Admins see every entity through their role, whether or not they are listed. Requires `workers:write` on a worker.
14661
+ * List who an entity is shared with. Admins see every entity through their role, whether or not they are listed. Requires `workers:write` on a worker and `case-types:write` on a case type.
14656
14662
  * @summary Get access
14657
14663
  */
14658
14664
  declare const getAccess: (entityType: AccessEntityType, entityId: string, options?: Parameters<typeof customFetch>[1]) => Promise<GetAccessEnvelope>;
14659
- declare const getGetAccessKey: (entityType: AccessEntityType, entityId: string) => readonly [`/v1/access/worker/${string}`];
14665
+ declare const getGetAccessKey: (entityType: AccessEntityType, entityId: string) => readonly [`/v1/access/worker/${string}` | `/v1/access/case_type/${string}`];
14660
14666
  type GetAccessQueryResult = NonNullable<Awaited$w<ReturnType<typeof getAccess>>>;
14661
14667
  /**
14662
14668
  * @summary Get access
@@ -14677,14 +14683,14 @@ declare const useGetAccess: <TError = ErrorType<ErrorResponse>>(entityType: Acce
14677
14683
  };
14678
14684
  declare const getUpdateAccessUrl: (entityType: AccessEntityType, entityId: string) => string;
14679
14685
  /**
14680
- * Replace who an entity is shared with. Each grantee must be a team member or a worker of the tenant. Requires `workers:write` on a worker. An editor who leaves their own grant out loses access, unless their role gives it.
14686
+ * Replace who an entity is shared with. Each grantee must be a team member or a worker of the tenant. Requires `workers:write` on a worker and `case-types:write` on a case type. An editor who leaves their own grant out loses access, unless their role gives it.
14681
14687
  * @summary Update access
14682
14688
  */
14683
14689
  declare const updateAccess: (entityType: AccessEntityType, entityId: string, updateAccessBody?: UpdateAccessBody, options?: Parameters<typeof customFetch>[1]) => Promise<UpdateAccessEnvelope>;
14684
14690
  declare const getUpdateAccessMutationFetcher: (entityType: AccessEntityType, entityId: string, options?: SecondParameter$w<typeof customFetch>) => (_: Key, { arg }: {
14685
14691
  arg: UpdateAccessBody | undefined;
14686
14692
  }) => Promise<UpdateAccessEnvelope>;
14687
- declare const getUpdateAccessMutationKey: (entityType: AccessEntityType, entityId: string) => readonly [`/v1/access/worker/${string}`];
14693
+ declare const getUpdateAccessMutationKey: (entityType: AccessEntityType, entityId: string) => readonly [`/v1/access/worker/${string}` | `/v1/access/case_type/${string}`];
14688
14694
  type UpdateAccessMutationResult = NonNullable<Awaited$w<ReturnType<typeof updateAccess>>>;
14689
14695
  /**
14690
14696
  * @summary Update access
@@ -14696,11 +14702,11 @@ declare const useUpdateAccess: <TError = ErrorType<ErrorResponse>>(entityType: A
14696
14702
  request?: SecondParameter$w<typeof customFetch>;
14697
14703
  }) => {
14698
14704
  isMutating: boolean;
14699
- trigger: swr_mutation.TriggerWithOptionsArgs<UpdateAccessEnvelope, TError, string | readonly [`/v1/access/worker/${string}`], UpdateAccessBody | undefined>;
14705
+ trigger: swr_mutation.TriggerWithOptionsArgs<UpdateAccessEnvelope, TError, string | readonly [`/v1/access/worker/${string}` | `/v1/access/case_type/${string}`], UpdateAccessBody | undefined>;
14700
14706
  reset: () => void;
14701
14707
  error: TError | undefined;
14702
14708
  data: UpdateAccessEnvelope | undefined;
14703
- swrKey: string | readonly [`/v1/access/worker/${string}`];
14709
+ swrKey: string | readonly [`/v1/access/worker/${string}` | `/v1/access/case_type/${string}`];
14704
14710
  };
14705
14711
  declare const getGetMyAccessUrl: (entityType: AccessEntityType, entityId: string) => string;
14706
14712
  /**
@@ -14708,7 +14714,7 @@ declare const getGetMyAccessUrl: (entityType: AccessEntityType, entityId: string
14708
14714
  * @summary Get my access
14709
14715
  */
14710
14716
  declare const getMyAccess: (entityType: AccessEntityType, entityId: string, options?: Parameters<typeof customFetch>[1]) => Promise<GetMyAccessEnvelope>;
14711
- declare const getGetMyAccessKey: (entityType: AccessEntityType, entityId: string) => readonly [`/v1/access/worker/${string}/me`];
14717
+ declare const getGetMyAccessKey: (entityType: AccessEntityType, entityId: string) => readonly [`/v1/access/worker/${string}/me` | `/v1/access/case_type/${string}/me`];
14712
14718
  type GetMyAccessQueryResult = NonNullable<Awaited$w<ReturnType<typeof getMyAccess>>>;
14713
14719
  /**
14714
14720
  * @summary Get my access
package/dist/index.js CHANGED
@@ -6552,7 +6552,8 @@ var useGetWorkerVersionChangeSummary = (workerId, version, options) => {
6552
6552
 
6553
6553
  // generated/models/accessEntityType.ts
6554
6554
  var AccessEntityType = {
6555
- worker: "worker"
6555
+ worker: "worker",
6556
+ case_type: "case_type"
6556
6557
  };
6557
6558
 
6558
6559
  // generated/models/accessLevel.ts
@@ -7006,7 +7007,9 @@ var EntityPermission = {
7006
7007
  "workers:read": "workers:read",
7007
7008
  "workers:run": "workers:run",
7008
7009
  "workers:write": "workers:write",
7009
- "workers:promote": "workers:promote"
7010
+ "workers:promote": "workers:promote",
7011
+ "case-types:read": "case-types:read",
7012
+ "case-types:write": "case-types:write"
7010
7013
  };
7011
7014
 
7012
7015
  // generated/models/executeCodeBodyEnvironment.ts
@@ -7692,7 +7695,8 @@ var OutboundJobStatus = {
7692
7695
  // generated/models/principalType.ts
7693
7696
  var PrincipalType = {
7694
7697
  profile: "profile",
7695
- worker: "worker"
7698
+ worker: "worker",
7699
+ tenant: "tenant"
7696
7700
  };
7697
7701
 
7698
7702
  // generated/models/profilePermissionsItem.ts
@@ -7710,6 +7714,8 @@ var ProfilePermissionsItem = {
7710
7714
  "teams:write": "teams:write",
7711
7715
  "cases:write": "cases:write",
7712
7716
  "cases:delete": "cases:delete",
7717
+ "case-types:read": "case-types:read",
7718
+ "case-types:create": "case-types:create",
7713
7719
  "case-types:write": "case-types:write",
7714
7720
  "information-requests:write": "information-requests:write",
7715
7721
  "information-requests:resolve": "information-requests:resolve",