This repository was archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathschema.graphql
More file actions
executable file
·10708 lines (9925 loc) · 261 KB
/
schema.graphql
File metadata and controls
executable file
·10708 lines (9925 loc) · 261 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
schema {
query: Query
mutation: Mutation
}
"""
This type is not returned by any resolver, but serves to document what an error
response will look like.
"""
type Error {
"""
A string giving more context about the error that occurred.
"""
message: String!
"""
The GraphQL path to where the error happened. For an error in the query
query {
user {
externalID # This is a nullable field that failed computing.
}
}
the path would be ["user", "externalID"].
"""
path: [String!]!
"""
Optional additional context on the error.
"""
extensions: ErrorExtensions
}
"""
Optional additional context on an error returned from a resolver.
It may also contain more properties, which aren't strictly typed here.
"""
type ErrorExtensions {
"""
An error code, which can be asserted on.
Possible error codes are communicated in the doc string of the field.
"""
code: String
}
"""
Represents a null return value.
"""
type EmptyResponse {
"""
A dummy null value.
"""
alwaysNil: String
}
"""
An object with an ID.
"""
interface Node {
"""
The ID of the node.
"""
id: ID!
}
"""
A valid JSON value.
"""
scalar JSONValue
"""
A string that contains valid JSON, with additional support for //-style comments and trailing commas.
"""
scalar JSONCString
"""
A mutation.
"""
type Mutation {
"""
INTERNAL ONLY: Sets the value of versions.auto_upgrade in the frontend db.
Determines behavior of multiversion upgrades.
Only site admins may perform this mutation.
"""
setAutoUpgrade(enable: Boolean!): EmptyResponse!
"""
Updates the user profile information for the user with the given ID.
Only the user and site admins may perform this mutation.
"""
updateUser(user: ID!, username: String, displayName: String, avatarURL: String): User!
"""
Updates the user's Self-serve Cody plan to Free or Pro.
Only the user may perform this mutation.
"""
changeCodyPlan(user: ID!, pro: Boolean!): User!
"""
Creates an organization. The caller is added as a member of the newly created organization.
Only authenticated users may perform this mutation.
"""
createOrganization(name: String!, displayName: String): Org!
"""
Updates an organization.
Only site admins and any member of the organization may perform this mutation.
"""
updateOrganization(id: ID!, displayName: String): Org!
"""
Soft deletes an organization.
Only site admins may perform this mutation.
"""
deleteOrganization(organization: ID!): EmptyResponse
"""
Creates a webhook for the specified code host. Only site admins may perform this mutation.
"""
createWebhook(name: String!, codeHostKind: String!, codeHostURN: String!, secret: String): Webhook!
"""
Deletes a webhook by given ID. Only site admins may perform this mutation.
"""
deleteWebhook(id: ID!): EmptyResponse!
"""
Updates a webhook with given ID. Null values aren't updated.
"""
updateWebhook(id: ID!, name: String, codeHostKind: String, codeHostURN: String, secret: String): Webhook!
"""
Adds a external service. Only site admins may perform this mutation.
"""
addExternalService(input: AddExternalServiceInput!): ExternalService!
"""
Updates a external service. Only site admins may perform this mutation.
"""
updateExternalService(input: UpdateExternalServiceInput!): ExternalService!
"""
Delete an external service. Only site admins may perform this mutation.
"""
deleteExternalService(externalService: ID!, async: Boolean = false): EmptyResponse!
"""
Excludes a repo from external services configs. Only site admins may perform this mutation.
"""
excludeRepoFromExternalServices(externalServices: [ID!]!, repo: ID!): EmptyResponse!
"""
Tests the connection to a mirror repository's original source repository. This is an
expensive and slow operation, so it should only be used for interactive diagnostics.
Only site admins may perform this mutation.
"""
checkMirrorRepositoryConnection(
"""
The ID of the existing repository whose mirror to check.
"""
repository: ID!
): CheckMirrorRepositoryConnectionResult!
"""
Schedule the mirror repository to be updated from its original source repository. Updating
occurs automatically, so this should not normally be needed.
Only site admins may perform this mutation.
"""
updateMirrorRepository(
"""
The mirror repository to update.
"""
repository: ID!
): EmptyResponse!
"""
Force Zoekt to reindex the repository right now. Reindexing occurs
automatically, so this should not normally be needed.
"""
reindexRepository(
"""
The repository to index
"""
repository: ID!
): EmptyResponse!
"""
Creates a new user account.
Only site admins may perform this mutation.
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
createUser(
"""
The new user's username.
"""
username: String!
"""
The new user's optional email address. If given, it must be verified by the user.
"""
email: String
"""
Whether or not to mark the provided email address as verified. If unset or set to
true, then the email address is immediately marked as verified - otherwise, the
email may be marked as unverified if SMTP and password resets are enabled.
"""
verifiedEmail: Boolean
): CreateUserResult!
"""
Randomize a user's password so that they need to reset it before they can sign in again.
Only site admins may perform this mutation.
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
randomizeUserPassword(user: ID!): RandomizeUserPasswordResult!
"""
Adds an email address to the user's account. The email address will be marked as unverified until the user
has followed the email verification process.
Only the user and site admins may perform this mutation.
"""
addUserEmail(user: ID!, email: String!): EmptyResponse!
"""
Removes an email address from the user's account.
Only the user and site admins may perform this mutation.
"""
removeUserEmail(user: ID!, email: String!): EmptyResponse!
"""
Set an email address as the user's primary.
Only the user and site admins may perform this mutation.
"""
setUserEmailPrimary(user: ID!, email: String!): EmptyResponse!
"""
Manually set the verification status of a user's email, without going through the normal verification process
(of clicking on a link in the email with a verification code).
Only site admins may perform this mutation.
"""
setUserEmailVerified(user: ID!, email: String!, verified: Boolean!): EmptyResponse!
"""
Resend a verification email, no op if the email is already verified.
Only the user and site admins may perform this mutation.
"""
resendVerificationEmail(user: ID!, email: String!): EmptyResponse!
"""
Deletes a user account. Only site admins may perform this mutation.
If hard == true, a hard delete is performed. By default, deletes are
'soft deletes' and could theoretically be undone with manual DB commands.
If a hard delete is performed, the data is truly removed from the
database and deletion can NEVER be undone.
Data that is deleted as part of this operation:
- All user data (access tokens, email addresses, external account info, survey responses, etc)
- Organization membership information (which organizations the user is a part of, any invitations created by or targeting the user).
- User, Organization, or Global settings authored by the user.
"""
deleteUser(user: ID!, hard: Boolean): EmptyResponse
"""
Bulk "deleteUser" action.
"""
deleteUsers(users: [ID!]!, hard: Boolean): EmptyResponse
"""
Bulk "recoverUser" action.
"""
recoverUsers(userIDs: [ID!]!): EmptyResponse
"""
Updates the current user's password. The oldPassword arg must match the user's current password.
"""
updatePassword(oldPassword: String!, newPassword: String!): EmptyResponse
"""
Creates a password for the current user. It is only permitted if the user does not have a password.
"""
createPassword(newPassword: String!): EmptyResponse
"""
Sets the user to accept the site's Terms of Service and Privacy Policy.
If the ID is omitted, the current user is assumed.
Only the user or site admins may perform this mutation.
"""
setTosAccepted(userID: ID): EmptyResponse!
"""
Creates an access token that grants the privileges of the specified user (referred to as the access token's
"subject" user after token creation). The result is the access token value, which the caller is responsible
for storing (it is not accessible by Sourcegraph after creation).
The supported scopes are:
- "user:all": Full control of all resources accessible to the user account.
- "site-admin:sudo": Ability to perform any action as any other user. (Only site admins may create tokens
with this scope.)
DurationSeconds: If provided, the number of seconds until the token expires automatically.
Only the user or site admins may perform this mutation.
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
createAccessToken(user: ID!, durationSeconds: Int, scopes: [String!]!, note: String!): CreateAccessTokenResult!
"""
Deletes and immediately revokes the specified access token, specified by either its ID or by the token
itself.
Only site admins or the user who owns the token may perform this mutation.
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
deleteAccessToken(byID: ID, byToken: String): EmptyResponse!
"""
Deletes the association between an external account and its Sourcegraph user. It does NOT delete the external
account on the external service where it resides.
Only site admins or the user who is associated with the external account may perform this mutation.
"""
deleteExternalAccount(externalAccount: ID!): EmptyResponse!
"""
Adds an external account to the authenticated user's account. The service type and service ID
must correspond to a valid auth provider on the site. The account details must be a stringified
JSON object that contains valid credentials for the provided service type.
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
addExternalAccount(serviceType: String!, serviceID: String!, accountDetails: String!): EmptyResponse!
"""
Invite the user with the given username to join the organization. The invited user account must already
exist.
Only site admins and any organization member may perform this mutation.
"""
inviteUserToOrganization(organization: ID!, username: String!): InviteUserToOrganizationResult!
"""
Accept or reject an existing organization invitation.
Only the recipient of the invitation may perform this mutation.
"""
respondToOrganizationInvitation(
"""
The organization invitation.
"""
organizationInvitation: ID!
"""
The response to the invitation.
"""
responseType: OrganizationInvitationResponseType!
): EmptyResponse!
"""
Immediately add a user as a member to the organization, without sending an invitation email.
Only site admins may perform this mutation. Organization members may use the inviteUserToOrganization
mutation to invite users.
"""
addUserToOrganization(organization: ID!, username: String!): EmptyResponse!
"""
Removes a user as a member from an organization.
Only site admins and any member of the organization may perform this mutation.
"""
removeUserFromOrganization(user: ID!, organization: ID!): EmptyResponse
"""
Adds a Phabricator repository to Sourcegraph.
"""
addPhabricatorRepo(
"""
The callsign, for example "MUX".
"""
callsign: String!
"""
The name, for example "github.com/gorilla/mux".
"""
name: String
"""
An alias for name. DEPRECATED: use name instead.
"""
uri: String
"""
The URL to the phabricator instance (e.g. http://phabricator.sgdev.org).
"""
url: String!
): EmptyResponse
"""
Resolves a revision for a given diff from Phabricator.
"""
resolvePhabricatorDiff(
"""
The name of the repository that the diff is based on.
"""
repoName: String!
"""
The ID of the diff on Phabricator.
"""
diffID: ID!
"""
The base revision this diff is based on.
"""
baseRev: String!
"""
The raw contents of the diff from Phabricator.
Required if Sourcegraph doesn't have a Conduit API token.
"""
patch: String
"""
The description of the diff. This will be used as the commit message.
"""
description: String
"""
The name of author of the diff.
"""
authorName: String
"""
The author's email.
"""
authorEmail: String
"""
When the diff was created.
"""
date: String
): GitCommit
"""
Logs a user event. No longer used, only here for backwards compatibility with IDE and browser extensions.
"""
logUserEvent(event: UserEvent!, userCookieID: String!): EmptyResponse
@deprecated(reason: "use telemetry { recordEvent } instead")
"""
Logs an event.
"""
logEvent(
"""
The name of the event.
"""
event: String!
"""
The randomly generated unique user ID stored in a browser cookie.
"""
userCookieID: String!
"""
The first sourcegraph URL visited by the user, stored in a browser cookie.
"""
firstSourceURL: String
"""
The last sourcegraph URL visited by the user, stored in a browser cookie.
"""
lastSourceURL: String
"""
The URL when the event was logged.
"""
url: String!
"""
The source of the event.
"""
source: EventSource!
"""
An optional cohort ID to identify the user as part of a specific A/B test.
The cohort ID is expected to be a date in the form YYYY-MM-DD
"""
cohortID: String
"""
An optional referrer parameter for the user's current session.
Only captured and stored on Sourcegraph Cloud.
"""
referrer: String
"""
The original referrer for a user
"""
originalReferrer: String
"""
The session referrer for a user
"""
sessionReferrer: String
"""
The sessions first url for a user
"""
sessionFirstURL: String
"""
Device session ID to identify the user's session for analytics.
"""
deviceSessionID: String
"""
The additional argument information.
"""
argument: String
"""
Public argument information. PRIVACY: Do NOT include any potentially private information in this field.
These properties get sent to our analytics tools for Cloud, so must not include private information,
such as search queries or repository names.
"""
publicArgument: String
"""
Device ID used for Amplitude analytics. Used on Sourcegraph Cloud only.
"""
deviceID: String
"""
Event ID used to deduplicate events that occur simultaneously in Amplitude analytics.
See https://developers.amplitude.com/docs/http-api-v2#optional-keys. Used on Sourcegraph Cloud only.
"""
eventID: Int
"""
Insert ID used to deduplicate events that re-occur in the event of retries or
backfills in Amplitude analytics. See https://developers.amplitude.com/docs/http-api-v2#optional-keys.
Used on Sourcegraph Cloud only.
"""
insertID: String
"""
The client that this event is being sent from.
"""
client: String
"""
The product category for the event, used for billing purposes.
"""
billingProductCategory: String
"""
The billing ID for the event, used for tagging user events for billing aggregation purposes.
"""
billingEventID: String
"""
The site ID that the client was connected to when the event was logged.
"""
connectedSiteID: String
"""
The connected site's license key, hashed using sha256. Used for uniquely identifying the site.
"""
hashedLicenseKey: String
): EmptyResponse @deprecated(reason: "use telemetry { recordEvent } instead")
"""
Logs a batch of events.
"""
logEvents(events: [Event!]): EmptyResponse @deprecated(reason: "use telemetry { recordEvent } instead")
"""
All mutations that update settings (global, organization, and user settings) are under this field.
Only the settings subject whose settings are being mutated (and site admins) may perform this mutation.
This mutation only affects global, organization, and user settings, not site configuration. For site
configuration (which is a separate set of configuration properties from global/organization/user settings),
use updateSiteConfiguration.
"""
settingsMutation(input: SettingsMutationGroupInput!): SettingsMutation
"""
DEPRECATED: Use settingsMutation instead. This field is a deprecated alias for settingsMutation and will be
removed in a future release.
"""
configurationMutation(input: SettingsMutationGroupInput!): SettingsMutation
@deprecated(reason: "use settingsMutation instead")
"""
Updates the site configuration. Returns whether or not a restart is required for the update to be applied.
Only site admins may perform this mutation.
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
updateSiteConfiguration(
"""
The last ID of the site configuration that is known by the client, to
prevent race conditions. An error will be returned if someone else
has already written a new update.
"""
lastID: Int!
"""
A JSON object containing the entire site configuration. The previous site configuration will be replaced
with this new value.
"""
input: String!
): Boolean!
"""
Sets whether the user with the specified user ID is a site admin.
Only site admins may perform this mutation.
"""
# 🚨 SECURITY: Only trusted users should be given site admin permissions.
# Site admins have full access to the site configuration and other
# sensitive data, and they can perform destructive actions such as
# restarting the site.
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
setUserIsSiteAdmin(userID: ID!, siteAdmin: Boolean!): EmptyResponse
"""
Invalidates all sessions belonging to a user.
Only site admins may perform this mutation.
"""
invalidateSessionsByID(userID: ID!): EmptyResponse
"""
Bulk "invalidateSessionsByID" action.
"""
invalidateSessionsByIDs(userIDs: [ID!]!): EmptyResponse
"""
Reloads the site by restarting the server. This is not supported for all deployment
types. This may cause downtime.
Only site admins may perform this mutation.
"""
reloadSite: EmptyResponse
"""
Submits a user satisfaction (NPS) survey.
"""
submitSurvey(input: SurveySubmissionInput!): EmptyResponse
"""
Submits happiness feedback.
"""
submitHappinessFeedback(input: HappinessFeedbackSubmissionInput!): EmptyResponse
"""
OBSERVABILITY
Set the status of a test alert of the specified parameters - useful for validating
'observability.alerts' configuration. Alerts may take up to a minute to fire.
"""
triggerObservabilityTestAlert(
"""
Level of alert to test - either warning or critical.
"""
level: String!
): EmptyResponse!
"""
Updates an out-of-band migration to run in a particular direction.
Applied in the forward direction, an out-of-band migration migrates data into a format that
is readable by newer Sourcegraph instances. This may be destructive or non-destructive process,
depending on the nature and implementation of the migration.
Applied in the reverse direction, an out-of-band migration ensures that data is moved back into
a format that is readable by the previous Sourcegraph instance. Recently introduced migrations
should be applied in reverse prior to downgrading the instance.
"""
setMigrationDirection(id: ID!, applyReverse: Boolean!): EmptyResponse!
"""
EXPERIMENTAL: Create a new feature flag
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
createFeatureFlag(
"""
The name of the feature flag
"""
name: String!
"""
The value of the feature flag. Only set if the new feature flag
will be a concrete boolean flag. Mutually exclusive with rolloutBasisPoints.
"""
value: Boolean
"""
The ratio of users the feature flag will apply to, expressed in basis points (0.01%).
Only set if the new feature flag will be a rollout flag.
Mutually exclusive with value.
"""
rolloutBasisPoints: Int
): FeatureFlag!
"""
EXPERIMENTAL: Delete a feature flag
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
deleteFeatureFlag(
"""
The name of the feature flag
"""
name: String!
): EmptyResponse!
"""
EXPERIMENTAL: Update a feature flag
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
updateFeatureFlag(
"""
The name of the feature flag
"""
name: String!
"""
The value of the feature flag. Only set if the new feature flag
will be a concrete boolean flag. Mutually exclusive with rollout.
"""
value: Boolean
"""
The ratio of users the feature flag will apply to, expressed in basis points (0.01%).
Mutually exclusive with value.
"""
rolloutBasisPoints: Int
): FeatureFlag!
"""
EXPERIMENTAL: Create a new feature flag override for the given org or user
"""
createFeatureFlagOverride(
"""
The namespace for this feature flag. Must be either a user ID or an org ID.
"""
namespace: ID!
"""
The name of the feature flag this override applies to
"""
flagName: String!
"""
The overridden value
"""
value: Boolean!
): FeatureFlagOverride!
"""
Delete a feature flag override
"""
deleteFeatureFlagOverride(
"""
The ID of the feature flag override to delete
"""
id: ID!
): EmptyResponse!
"""
Update a feature flag override
"""
updateFeatureFlagOverride(
"""
The ID of the feature flag override to update
"""
id: ID!
"""
The updated value of the feature flag override
"""
value: Boolean!
): FeatureFlagOverride!
"""
Overwrites and saves the temporary settings for the current user.
If temporary settings for the user do not exist, they are created.
"""
overwriteTemporarySettings(
"""
The new temporary settings for the current user, as a JSON string.
"""
contents: String!
): EmptyResponse!
"""
Merges the given settings edit with the current temporary settings for the current user.
Keys in the given edit take priority over key in the temporary settings. The merge is
not recursive.
If temporary settings for the user do not exist, they are created.
"""
editTemporarySettings(
"""
The settings to merge with the current temporary settings for the current user, as a JSON string.
"""
settingsToEdit: String!
): EmptyResponse!
"""
Sends an email for testing Sourcegraph's email configuration.
Only administrators can use this API.
"""
# 🚧 CLOUD: This mutation is used by Cloud automation - please do not
# introduce any breaking changes, and let new parameters be optional with
# reasonable defaults instead.
sendTestEmail(to: String!): String!
"""
Enqueues a sync for the external service. It will be picked up in the background.
Site-admin or owner of the external service only.
"""
syncExternalService(id: ID!): EmptyResponse!
"""
Cancels an external service sync job. Must be in queued or processing state.
Site-admin or owner of the external service only.
"""
cancelExternalServiceSync(id: ID!): EmptyResponse!
"""
Associate a new key-value pair with a repo.
"""
addRepoKeyValuePair(repo: ID!, key: String!, value: String): EmptyResponse!
@deprecated(
reason: "Use addRepoMetadata instead. This field is a deprecated and will be removed in a future release."
)
"""
Associate a new key-value pair metadata with a repo.
"""
addRepoMetadata(repo: ID!, key: String!, value: String): EmptyResponse!
"""
Update a key-value pair associated with a repo.
"""
updateRepoKeyValuePair(repo: ID!, key: String!, value: String): EmptyResponse!
@deprecated(
reason: "Use updateRepoMetadata instead. This field is a deprecated and will be removed in a future release."
)
"""
Update metadata value for a given metadata key for associated with a repo.
"""
updateRepoMetadata(repo: ID!, key: String!, value: String): EmptyResponse!
"""
Delete a key-value pair associated with a repo.
"""
deleteRepoKeyValuePair(repo: ID!, key: String!): EmptyResponse!
@deprecated(
reason: "Use deleteRepoMetadata instead. This field is a deprecated and will be removed in a future release."
)
"""
Delete a key-value pair metadata associated with a repo.
"""
deleteRepoMetadata(repo: ID!, key: String!): EmptyResponse!
"""
INTERNAL ONLY: Reclone a repository from the gitserver. This involves deleting
the file on disk, marking it as not-cloned in the database, and then initiating
a repo clone.
"""
recloneRepository(repo: ID!): EmptyResponse!
"""
INTERNAL ONLY: Delete a repository from the gitserver. This involves deleting
the file on disk, and marking it as not-cloned in the database.
"""
deleteRepositoryFromDisk(repo: ID!): EmptyResponse!
"""
Create a new package repo reference filter.
"""
addPackageRepoFilter(
"""
Whether the matcher should be for allowlisting or blocklisting.
"""
behaviour: PackageMatchBehaviour!
"""
The ecosystem of the package repo reference this matcher should apply to.
Maps to the external service whos config would be updated when used in the
set query.
"""
kind: PackageRepoReferenceKind!
"""
The package repo reference matcher to persist.
"""
filter: PackageVersionOrNameFilterInput!
): PackageFilter!
"""
Updates a package repo reference filter.
"""
updatePackageRepoFilter(
"""
The ID of the package repo reference filter to update.
"""
id: ID!
behaviour: PackageMatchBehaviour!
"""
The ecosystem of the package repo reference this matcher should apply to.
Maps to the external service whos config would be updated when used in the
set query.
"""
kind: PackageRepoReferenceKind!
filter: PackageVersionOrNameFilterInput!
): EmptyResponse!
"""
Deletes a package repo reference filter.
"""
deletePackageRepoFilter(id: ID!): EmptyResponse!
"""
Sets the completions requests quota for the user per day. Quota: Null means
use the default quota.
"""
setUserCompletionsQuota(user: ID!, quota: Int): User!
"""
Sets the code completions requests quota for the user per day. Quota: Null means
use the default quota.
"""
setUserCodeCompletionsQuota(user: ID!, quota: Int): User!
}
"""
A description of a user event.
"""
input Event {
"""
The name of the event.
"""
event: String!
"""
The randomly generated unique user ID stored in a browser cookie.
"""
userCookieID: String!
"""
The first sourcegraph URL visited by the user, stored in a browser cookie.
"""
firstSourceURL: String
"""
The last sourcegraph URL visited by the user, stored in a browser cookie.
"""
lastSourceURL: String
"""
The URL when the event was logged.
"""
url: String!
"""
The source of the event.
"""
source: EventSource!
"""
An optional cohort ID to identify the user as part of a specific A/B test.
The cohort ID is expected to be a date in the form YYYY-MM-DD
"""
cohortID: String
"""
An optional referrer parameter for the user's current session.
Only captured and stored on Sourcegraph Cloud.
"""
referrer: String
"""
The original referrer for a user
"""
originalReferrer: String
"""
The session referrer for a user
"""
sessionReferrer: String
"""
The sessions first url for a user
"""
sessionFirstURL: String
"""
Device session ID to identify the user's session for analytics.
"""
deviceSessionID: String
"""
The additional argument information.
"""
argument: String
"""
Public argument information. PRIVACY: Do NOT include any potentially private information in this field.
These properties get sent to our analytics tools for Cloud, so must not include private information,
such as search queries or repository names.
"""
publicArgument: String
"""
Device ID used for Amplitude analytics. Used on Sourcegraph Cloud only.
"""
deviceID: String
"""
Event ID used to deduplicate events that occur simultaneously in Amplitude analytics.
See https://developers.amplitude.com/docs/http-api-v2#optional-keys. Used on Sourcegraph Cloud only.
"""
eventID: Int
"""
Insert ID used to deduplicate events that re-occur in the event of retries or
backfills in Amplitude analytics. See https://developers.amplitude.com/docs/http-api-v2#optional-keys.
Used on Sourcegraph Cloud only.
"""
insertID: String
"""
The client that this event is being sent from.
"""
client: String
"""
The product category for the event, used for billing purposes.
"""
billingProductCategory: String
"""
The billing ID for the event, used for tagging user events for billing aggregation purposes.
"""
billingEventID: String
"""
The site ID that the client was connected to when the event was logged.
"""
connectedSiteID: String
"""
The connected site's license key, hashed using sha256. Used for uniquely identifying the site.
"""
hashedLicenseKey: String
}