@finueva/drive 0.21.1 → 0.22.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.
@@ -3695,7 +3695,7 @@ interface operations {
3695
3695
  action: "items:content:read" | "items:create" | "items:delete" | "items:metadata:read" | "items:permissions:manage" | "items:permissions:read" | "items:update";
3696
3696
  allowed: boolean;
3697
3697
  /** @enum {string|null} */
3698
- basis: "workspace_visibility" | "restricted_administrator_bypass" | "direct_grant" | "inherited_grant" | null;
3698
+ basis: "workspace_visibility" | "restricted_administrator_bypass" | "item_owner" | "direct_grant" | "inherited_grant" | null;
3699
3699
  grantId: string | null;
3700
3700
  sourceItemId: string | null;
3701
3701
  }[] & (unknown & unknown & unknown & unknown & unknown & unknown & unknown);
@@ -3821,6 +3821,454 @@ interface operations {
3821
3821
  };
3822
3822
  };
3823
3823
  };
3824
+ createInternalItemPermission: {
3825
+ parameters: {
3826
+ query?: never;
3827
+ header: {
3828
+ "Idempotency-Key": string;
3829
+ "If-Match": string;
3830
+ };
3831
+ path: {
3832
+ workspaceId: string;
3833
+ itemId: string;
3834
+ };
3835
+ cookie?: never;
3836
+ };
3837
+ requestBody: {
3838
+ content: {
3839
+ "application/json": {
3840
+ actions: ("items:content:read" | "items:create" | "items:delete" | "items:metadata:read" | "items:permissions:read" | "items:update")[];
3841
+ expiresAtEpochMilliseconds: number | null;
3842
+ grantee: {
3843
+ /** @enum {string} */
3844
+ type: "user";
3845
+ userId: string;
3846
+ } | {
3847
+ teamId: string;
3848
+ /** @enum {string} */
3849
+ type: "team";
3850
+ };
3851
+ };
3852
+ };
3853
+ };
3854
+ responses: {
3855
+ /** @description The exact committed result was replayed. */
3856
+ 200: {
3857
+ headers: {
3858
+ /** @description Current direct collection precondition for the next POST. */
3859
+ "Drive-Permission-Collection-ETag"?: string;
3860
+ /** @description Current direct-grant precondition for PATCH or DELETE; omitted when the current row is not mutable. */
3861
+ "Drive-Permission-Grant-ETag"?: string;
3862
+ [name: string]: unknown;
3863
+ };
3864
+ content: {
3865
+ "application/json": {
3866
+ collectionRevision: number;
3867
+ grant: {
3868
+ actions: ("items:content:read" | "items:create" | "items:delete" | "items:metadata:read" | "items:permissions:read" | "items:update")[];
3869
+ /** @enum {string} */
3870
+ availability: "active" | "expired" | "revoked";
3871
+ expiresAtEpochMilliseconds: number | null;
3872
+ grantId: string;
3873
+ grantee: {
3874
+ /** @enum {string} */
3875
+ type: "user";
3876
+ userId: string;
3877
+ } | {
3878
+ teamId: string;
3879
+ /** @enum {string} */
3880
+ type: "team";
3881
+ };
3882
+ revision: number;
3883
+ /** @enum {string} */
3884
+ source: "direct";
3885
+ sourceItemId: string;
3886
+ };
3887
+ /** @enum {string} */
3888
+ outcome: "committed" | "replayed";
3889
+ };
3890
+ };
3891
+ };
3892
+ /** @description The direct grant was committed. */
3893
+ 201: {
3894
+ headers: {
3895
+ /** @description Current direct collection precondition for the next POST. */
3896
+ "Drive-Permission-Collection-ETag"?: string;
3897
+ /** @description Current direct-grant precondition for PATCH or DELETE; omitted when the current row is not mutable. */
3898
+ "Drive-Permission-Grant-ETag"?: string;
3899
+ [name: string]: unknown;
3900
+ };
3901
+ content: {
3902
+ "application/json": {
3903
+ collectionRevision: number;
3904
+ grant: {
3905
+ actions: ("items:content:read" | "items:create" | "items:delete" | "items:metadata:read" | "items:permissions:read" | "items:update")[];
3906
+ /** @enum {string} */
3907
+ availability: "active" | "expired" | "revoked";
3908
+ expiresAtEpochMilliseconds: number | null;
3909
+ grantId: string;
3910
+ grantee: {
3911
+ /** @enum {string} */
3912
+ type: "user";
3913
+ userId: string;
3914
+ } | {
3915
+ teamId: string;
3916
+ /** @enum {string} */
3917
+ type: "team";
3918
+ };
3919
+ revision: number;
3920
+ /** @enum {string} */
3921
+ source: "direct";
3922
+ sourceItemId: string;
3923
+ };
3924
+ /** @enum {string} */
3925
+ outcome: "committed" | "replayed";
3926
+ };
3927
+ };
3928
+ };
3929
+ /** @description A valid Drive user bearer credential is required. */
3930
+ 401: {
3931
+ headers: {
3932
+ [name: string]: unknown;
3933
+ };
3934
+ content: {
3935
+ "application/json": {
3936
+ error: {
3937
+ /** @enum {string} */
3938
+ code: "authentication_required";
3939
+ details: Record<string, never>;
3940
+ /** @enum {string} */
3941
+ message: "Authentication is required.";
3942
+ requestId: string;
3943
+ };
3944
+ };
3945
+ };
3946
+ };
3947
+ /** @description The discoverable item does not permit this permission operation. */
3948
+ 403: {
3949
+ headers: {
3950
+ [name: string]: unknown;
3951
+ };
3952
+ content: {
3953
+ "application/json": {
3954
+ error: {
3955
+ /** @enum {string} */
3956
+ code: "permission_denied";
3957
+ details: Record<string, never>;
3958
+ /** @enum {string} */
3959
+ message: "The requested action is not permitted.";
3960
+ requestId: string;
3961
+ };
3962
+ };
3963
+ };
3964
+ };
3965
+ /** @description The item, principal, or direct grant is absent or undiscoverable. */
3966
+ 404: {
3967
+ headers: {
3968
+ [name: string]: unknown;
3969
+ };
3970
+ content: {
3971
+ "application/json": {
3972
+ error: {
3973
+ /** @enum {string} */
3974
+ code: "resource_not_found";
3975
+ details: Record<string, never>;
3976
+ /** @enum {string} */
3977
+ message: "The requested resource was not found.";
3978
+ requestId: string;
3979
+ };
3980
+ };
3981
+ };
3982
+ };
3983
+ /** @description The idempotency key was reused for a different semantic request. */
3984
+ 409: {
3985
+ headers: {
3986
+ [name: string]: unknown;
3987
+ };
3988
+ content: {
3989
+ "application/json": {
3990
+ error: {
3991
+ /** @enum {string} */
3992
+ code: "idempotency_conflict";
3993
+ details: Record<string, never>;
3994
+ /** @enum {string} */
3995
+ message: "The idempotency key conflicts with an earlier request.";
3996
+ requestId: string;
3997
+ };
3998
+ };
3999
+ };
4000
+ };
4001
+ /** @description The supplied revision or post-preflight authority is stale. */
4002
+ 412: {
4003
+ headers: {
4004
+ [name: string]: unknown;
4005
+ };
4006
+ content: {
4007
+ "application/json": {
4008
+ error: {
4009
+ /** @enum {string} */
4010
+ code: "precondition_failed";
4011
+ details: Record<string, never>;
4012
+ /** @enum {string} */
4013
+ message: "The request precondition failed.";
4014
+ requestId: string;
4015
+ };
4016
+ };
4017
+ };
4018
+ };
4019
+ /** @description The path, query, headers, idempotency key, or body are invalid. */
4020
+ 422: {
4021
+ headers: {
4022
+ [name: string]: unknown;
4023
+ };
4024
+ content: {
4025
+ "application/json": {
4026
+ error: {
4027
+ /** @enum {string} */
4028
+ code: "invalid_request";
4029
+ details: Record<string, never>;
4030
+ /** @enum {string} */
4031
+ message: "The request is invalid.";
4032
+ requestId: string;
4033
+ };
4034
+ } | {
4035
+ error: {
4036
+ /** @enum {string} */
4037
+ code: "invalid_idempotency_key";
4038
+ details: Record<string, never>;
4039
+ /** @enum {string} */
4040
+ message: "The idempotency key is invalid.";
4041
+ requestId: string;
4042
+ };
4043
+ };
4044
+ };
4045
+ };
4046
+ /** @description Identity, D1, authorization, audit, cursor, or capacity authority is unavailable. */
4047
+ 503: {
4048
+ headers: {
4049
+ [name: string]: unknown;
4050
+ };
4051
+ content: {
4052
+ "application/json": {
4053
+ error: {
4054
+ /** @enum {string} */
4055
+ code: "identity_authority_unavailable";
4056
+ details: Record<string, never>;
4057
+ /** @enum {string} */
4058
+ message: "Authentication is temporarily unavailable.";
4059
+ requestId: string;
4060
+ };
4061
+ } | {
4062
+ error: {
4063
+ /** @enum {string} */
4064
+ code: "service_unavailable";
4065
+ details: Record<string, never>;
4066
+ /** @enum {string} */
4067
+ message: "The service is temporarily unavailable.";
4068
+ requestId: string;
4069
+ };
4070
+ };
4071
+ };
4072
+ };
4073
+ };
4074
+ };
4075
+ revokeInternalItemPermission: {
4076
+ parameters: {
4077
+ query?: never;
4078
+ header: {
4079
+ "Idempotency-Key": string;
4080
+ "If-Match": string;
4081
+ };
4082
+ path: {
4083
+ workspaceId: string;
4084
+ itemId: string;
4085
+ grantId: string;
4086
+ };
4087
+ cookie?: never;
4088
+ };
4089
+ requestBody?: never;
4090
+ responses: {
4091
+ /** @description The retained revoked grant was committed, replayed, or unchanged. */
4092
+ 200: {
4093
+ headers: {
4094
+ /** @description Current direct collection precondition for POST. */
4095
+ "Drive-Permission-Collection-ETag"?: string;
4096
+ [name: string]: unknown;
4097
+ };
4098
+ content: {
4099
+ "application/json": {
4100
+ collectionRevision: number;
4101
+ grant: {
4102
+ actions: ("items:content:read" | "items:create" | "items:delete" | "items:metadata:read" | "items:permissions:read" | "items:update")[];
4103
+ /** @enum {string} */
4104
+ availability: "active" | "expired" | "revoked";
4105
+ expiresAtEpochMilliseconds: number | null;
4106
+ grantId: string;
4107
+ grantee: {
4108
+ /** @enum {string} */
4109
+ type: "user";
4110
+ userId: string;
4111
+ } | {
4112
+ teamId: string;
4113
+ /** @enum {string} */
4114
+ type: "team";
4115
+ };
4116
+ revision: number;
4117
+ /** @enum {string} */
4118
+ source: "direct";
4119
+ sourceItemId: string;
4120
+ };
4121
+ /** @enum {string} */
4122
+ outcome: "committed" | "replayed";
4123
+ };
4124
+ };
4125
+ };
4126
+ /** @description A valid Drive user bearer credential is required. */
4127
+ 401: {
4128
+ headers: {
4129
+ [name: string]: unknown;
4130
+ };
4131
+ content: {
4132
+ "application/json": {
4133
+ error: {
4134
+ /** @enum {string} */
4135
+ code: "authentication_required";
4136
+ details: Record<string, never>;
4137
+ /** @enum {string} */
4138
+ message: "Authentication is required.";
4139
+ requestId: string;
4140
+ };
4141
+ };
4142
+ };
4143
+ };
4144
+ /** @description The discoverable item does not permit this permission operation. */
4145
+ 403: {
4146
+ headers: {
4147
+ [name: string]: unknown;
4148
+ };
4149
+ content: {
4150
+ "application/json": {
4151
+ error: {
4152
+ /** @enum {string} */
4153
+ code: "permission_denied";
4154
+ details: Record<string, never>;
4155
+ /** @enum {string} */
4156
+ message: "The requested action is not permitted.";
4157
+ requestId: string;
4158
+ };
4159
+ };
4160
+ };
4161
+ };
4162
+ /** @description The item, principal, or direct grant is absent or undiscoverable. */
4163
+ 404: {
4164
+ headers: {
4165
+ [name: string]: unknown;
4166
+ };
4167
+ content: {
4168
+ "application/json": {
4169
+ error: {
4170
+ /** @enum {string} */
4171
+ code: "resource_not_found";
4172
+ details: Record<string, never>;
4173
+ /** @enum {string} */
4174
+ message: "The requested resource was not found.";
4175
+ requestId: string;
4176
+ };
4177
+ };
4178
+ };
4179
+ };
4180
+ /** @description The idempotency key was reused for a different semantic request. */
4181
+ 409: {
4182
+ headers: {
4183
+ [name: string]: unknown;
4184
+ };
4185
+ content: {
4186
+ "application/json": {
4187
+ error: {
4188
+ /** @enum {string} */
4189
+ code: "idempotency_conflict";
4190
+ details: Record<string, never>;
4191
+ /** @enum {string} */
4192
+ message: "The idempotency key conflicts with an earlier request.";
4193
+ requestId: string;
4194
+ };
4195
+ };
4196
+ };
4197
+ };
4198
+ /** @description The supplied revision or post-preflight authority is stale. */
4199
+ 412: {
4200
+ headers: {
4201
+ [name: string]: unknown;
4202
+ };
4203
+ content: {
4204
+ "application/json": {
4205
+ error: {
4206
+ /** @enum {string} */
4207
+ code: "precondition_failed";
4208
+ details: Record<string, never>;
4209
+ /** @enum {string} */
4210
+ message: "The request precondition failed.";
4211
+ requestId: string;
4212
+ };
4213
+ };
4214
+ };
4215
+ };
4216
+ /** @description The path, query, headers, idempotency key, or body are invalid. */
4217
+ 422: {
4218
+ headers: {
4219
+ [name: string]: unknown;
4220
+ };
4221
+ content: {
4222
+ "application/json": {
4223
+ error: {
4224
+ /** @enum {string} */
4225
+ code: "invalid_request";
4226
+ details: Record<string, never>;
4227
+ /** @enum {string} */
4228
+ message: "The request is invalid.";
4229
+ requestId: string;
4230
+ };
4231
+ } | {
4232
+ error: {
4233
+ /** @enum {string} */
4234
+ code: "invalid_idempotency_key";
4235
+ details: Record<string, never>;
4236
+ /** @enum {string} */
4237
+ message: "The idempotency key is invalid.";
4238
+ requestId: string;
4239
+ };
4240
+ };
4241
+ };
4242
+ };
4243
+ /** @description Identity, D1, authorization, audit, cursor, or capacity authority is unavailable. */
4244
+ 503: {
4245
+ headers: {
4246
+ [name: string]: unknown;
4247
+ };
4248
+ content: {
4249
+ "application/json": {
4250
+ error: {
4251
+ /** @enum {string} */
4252
+ code: "identity_authority_unavailable";
4253
+ details: Record<string, never>;
4254
+ /** @enum {string} */
4255
+ message: "Authentication is temporarily unavailable.";
4256
+ requestId: string;
4257
+ };
4258
+ } | {
4259
+ error: {
4260
+ /** @enum {string} */
4261
+ code: "service_unavailable";
4262
+ details: Record<string, never>;
4263
+ /** @enum {string} */
4264
+ message: "The service is temporarily unavailable.";
4265
+ requestId: string;
4266
+ };
4267
+ };
4268
+ };
4269
+ };
4270
+ };
4271
+ };
3824
4272
  revokeItemPermission: {
3825
4273
  parameters: {
3826
4274
  query?: never;
@@ -8246,8 +8694,11 @@ interface DriveOperations {
8246
8694
  listItemPermissions(input: ListItemPermissionsInput): Promise<DriveOperationResult<PermissionPage, 200>>;
8247
8695
  readEffectiveItemPermissions(input: ReadEffectiveItemPermissionsInput): Promise<DriveOperationResult<EffectivePermissionResponse, 200>>;
8248
8696
  createItemPermission(input: CreateItemPermissionInput): Promise<DriveOperationResult<PermissionMutation, 200 | 201>>;
8697
+ /** Owner-only file sharing to a fresh member of the same organization; viewer/editor actions only. */
8698
+ createInternalItemPermission(input: CreateItemPermissionInput): Promise<DriveOperationResult<PermissionMutation, 200 | 201>>;
8249
8699
  updateItemPermission(input: UpdateItemPermissionInput): Promise<DriveOperationResult<PermissionMutation, 200>>;
8250
8700
  revokeItemPermission(input: RevokeItemPermissionInput): Promise<DriveOperationResult<PermissionMutation, 200>>;
8701
+ revokeInternalItemPermission(input: RevokeItemPermissionInput): Promise<DriveOperationResult<PermissionMutation, 200>>;
8251
8702
  createUpload(input: CreateUploadInput): Promise<DriveOperationResult<UploadSession, 200 | 201>>;
8252
8703
  getUploadStatus(input: GetUploadStatusInput): Promise<DriveOperationResult<UploadStatus, 200>>;
8253
8704
  createUploadPartDescriptor(input: CreateUploadPartDescriptorInput): Promise<DriveOperationResult<UploadPartDescriptor, 200>>;