audience-kit 0.2.0 → 0.3.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.
data/sig/audience/kit.rbs CHANGED
@@ -1,31 +1,668 @@
1
+ # Signatures for the audience-kit gem's public API.
1
2
  module Audience
2
3
  module Kit
3
4
  VERSION: String
5
+ API_VERSION: String
6
+ PRODUCTION_BASE_URL: String
4
7
  DEFAULT_BASE_URL: String
5
-
6
- class Error < StandardError
7
- end
8
+ API_VERSION_HEADER: String
9
+ CLIENT_HEADER: String
8
10
 
9
11
  attr_writer self.base_url: String?
10
12
  attr_writer self.token: String?
11
- attr_writer self.connection: untyped
12
-
13
+ attr_writer self.audience_id: String?
14
+ attr_writer self.host: String?
15
+ attr_writer self.session: Session?
16
+ def self.client_header: () -> String
17
+ def self.older?: (String minimum, ?String version) -> bool
13
18
  def self.base_url: () -> String
14
19
  def self.token: () -> String?
20
+ def self.audience_id: () -> String?
21
+ def self.host: () -> String?
15
22
  def self.configure: () { (singleton(Kit)) -> void } -> singleton(Kit)
16
- def self.connection: () -> untyped
17
- def self.get: (String path) -> untyped
23
+ def self.session: () -> Session
24
+ def self.query: (String document, ?Hash[String, untyped]? variables) -> Hash[String, untyped]
25
+ def self.reset!: () -> void
18
26
 
19
- class Event
20
- attr_reader data: Hash[String, untyped]
21
- def self.find: (untyped id) -> Event
22
- def initialize: (Hash[String, untyped] data) -> void
27
+ type json = Hash[String, untyped]
28
+
29
+ class GraphQLError
30
+ attr_reader message: String
31
+ attr_reader path: Array[String | Integer]?
32
+ attr_reader extensions: json?
33
+ def initialize: (message: String, ?path: Array[String | Integer]?, ?extensions: json?) -> void
34
+ def self.from_h: (untyped data) -> GraphQLError
35
+ def code: () -> String?
36
+ end
37
+
38
+ class Error < StandardError
39
+ UNAUTHENTICATED: String
40
+ FORBIDDEN: String
41
+ NOT_FOUND: String
42
+ INVALID: String
43
+ RATE_LIMITED: String
44
+ CONFLICT: String
45
+ INTERNAL: String
46
+ NOT_SIGNED_IN: String
47
+ SIGN_IN_REJECTED: String
48
+ SIGN_IN_FAILED: String
49
+ HTTP: String
50
+ NETWORK: String
51
+ DECODING: String
52
+ GRAPHQL: String
53
+ MISSING_CONFIGURATION: String
54
+ STORAGE: String
55
+ UPDATE_REQUIRED: String
56
+ UNSUPPORTED_API_VERSION: String
57
+ UNSUPPORTED_API_VERSION_ERROR: String
58
+
59
+ attr_reader code: String
60
+ attr_reader status: Integer?
61
+ attr_reader fields: Hash[String, Array[String]]
62
+ attr_reader errors: Array[GraphQLError]
63
+ attr_reader minimum_sdk_version: String?
64
+ def initialize: (?String message, ?code: String, ?status: Integer?, ?fields: Hash[String, Array[String]],
65
+ ?errors: Array[GraphQLError], ?minimum_sdk_version: String?) -> void
66
+ def self.graphql: (Array[GraphQLError] errors) -> Error
67
+ def unauthenticated?: () -> bool
68
+ def undefined_field?: () -> bool
69
+ end
70
+
71
+ module Environment
72
+ PRODUCTION: String
73
+ STAGING: String
74
+ HEADER: String
75
+ KNOWN: Array[String]
76
+ end
77
+
78
+ module GraphQLEndpoint
79
+ CONSUMER: String
80
+ def self.path: (String audience_id, ?String endpoint) -> String
81
+ end
82
+
83
+ class Configuration
84
+ attr_reader base_url: String
85
+ attr_reader host: String?
86
+ attr_reader audience_id: String?
87
+ attr_reader facebook_app_id: String?
88
+ attr_reader environment: String
89
+ attr_reader trusted_credential_origins: Array[String]
90
+ def initialize: (?base_url: String, ?host: String?, ?audience_id: String?, ?facebook_app_id: String?,
91
+ ?environment: String, ?trusted_credential_origins: Array[String]) -> void
92
+ def api_base: (Credential? credential) -> String
93
+ def self.same_origin?: (String lhs, String rhs) -> bool
94
+ end
95
+
96
+ class Credential
97
+ attr_reader token: String
98
+ attr_reader user_id: String?
99
+ attr_reader audience_id: String?
100
+ attr_reader role: String
101
+ attr_reader endpoint: String
102
+ attr_reader venue_device_id: String?
103
+ attr_reader expires_at: Time?
104
+ attr_reader api_version: String
105
+ attr_reader scopes: Array[String]
106
+ attr_reader audience: String?
107
+ def initialize: (token: String, endpoint: String, ?user_id: String?, ?audience_id: String?, ?role: String,
108
+ ?venue_device_id: String?, ?expires_at: Time?, ?api_version: String, ?scopes: Array[String],
109
+ ?audience: String?) -> void
110
+ def self.from_h: (json data) -> Credential
111
+ def to_h: () -> json
112
+ def expired?: (?Time at) -> bool
113
+ def expires_within?: (Numeric seconds, ?Time at) -> bool
114
+ def service?: () -> bool
115
+ def scope?: (String scope) -> bool
116
+ def origin: () -> String?
117
+ end
118
+
119
+ interface _CredentialStore
120
+ def load: () -> Credential?
121
+ def save: (Credential credential) -> void
122
+ def delete: () -> void
123
+ end
124
+
125
+ module CredentialStore : _CredentialStore
126
+ end
127
+
128
+ class MemoryCredentialStore
129
+ include CredentialStore
130
+ def initialize: (?Credential? credential) -> void
131
+ end
132
+
133
+ class SessionCredentialStore
134
+ include CredentialStore
135
+ attr_reader key: String
136
+ def initialize: (untyped session, ?key: String) -> void
137
+ end
138
+
139
+ class DeviceDescription
140
+ attr_reader identifier: String
141
+ attr_reader type: String
142
+ attr_reader model: String?
143
+ attr_reader version: String?
144
+ attr_reader build: String?
145
+ def initialize: (identifier: String, ?type: String, ?model: String?, ?version: String?, ?build: String?) -> void
146
+ def to_body: () -> Hash[String, String]
147
+ end
148
+
149
+ class SchemaShape
150
+ attr_reader fields: Hash[String, Array[String]]?
151
+ def initialize: (?Hash[String, Array[String]]? fields) -> void
152
+ def self.everything: () -> SchemaShape
153
+ def has?: (String type, String field) -> bool
154
+ end
155
+
156
+ class Coordinate
157
+ attr_reader latitude: Float
158
+ attr_reader longitude: Float
159
+ attr_reader beacon_major: Integer?
160
+ attr_reader beacon_minor: Integer?
161
+ def initialize: (latitude: Numeric, longitude: Numeric, ?beacon_major: Integer?, ?beacon_minor: Integer?) -> void
162
+ def self.from_wkt: (String wkt) -> Coordinate?
163
+ def to_input: () -> Hash[String, Numeric]
164
+ def to_wkt: () -> String
165
+ def distance_to: (Coordinate other) -> Float
166
+ end
167
+
168
+ class Color
169
+ attr_reader red: Float
170
+ attr_reader green: Float
171
+ attr_reader blue: Float
172
+ attr_reader alpha: Float
173
+ def initialize: (red: Numeric, green: Numeric, blue: Numeric, ?alpha: Numeric) -> void
174
+ def self.from_hex: (String hex) -> Color?
175
+ def self.from_theme: (json? theme, String token, ?dark: bool) -> Color?
176
+ def to_css: () -> String
177
+ def to_hex: () -> String
178
+ end
179
+
180
+ module CoverPass
181
+ PREFIX: String
182
+ WINDOW_SECONDS: Integer
183
+ def self.window: (Integer epoch_seconds) -> Integer
184
+ def self.seconds_until_next_window: (Integer epoch_seconds) -> Integer
185
+ def self.signature: (String admission_id, String pass_secret, Integer window) -> String
186
+ def self.code: (String admission_id, String pass_secret, ?Integer? epoch_seconds) -> String
187
+ def self.code?: (String code) -> bool
188
+ end
189
+
190
+ module ReportTarget
191
+ MESSAGE: String
192
+ PERSON: String
193
+ PHOTO: String
194
+ PING: String
195
+ PRIVATE_MESSAGE: String
196
+ POST: String
197
+ POST_COMMENT: String
198
+ VENUE: String
199
+ ALL: Array[String]
200
+ INTIMATE_IMAGE: String
201
+ REASONS: Array[String]
202
+ end
203
+
204
+ class Model
205
+ attr_reader raw: json
206
+ alias data raw
207
+ def self.from: (untyped data) -> instance?
208
+ def self.list: (untyped data) -> Array[instance]
209
+ def self.attributes: () -> Array[Symbol]
210
+ def initialize: (json raw) -> void
211
+ def []: (String | Symbol key) -> untyped
212
+ def dig: (*(String | Symbol) keys) -> untyped
213
+ def to_h: () -> json
214
+ def to_json: (*untyped) -> String
215
+ end
216
+
217
+ class Page < Model
218
+ def id: () -> String
219
+ def name: () -> String
220
+ def photo_url: () -> String?
221
+ def banner_url: () -> String?
222
+ end
223
+
224
+ class Profile < Model
225
+ def id: () -> String
226
+ def name: () -> String
227
+ def avatar_url: () -> String?
228
+ end
229
+
230
+ class Audience < Model
231
+ def id: () -> String
232
+ def name: () -> String
233
+ def subdomain: () -> String?
234
+ def theme: () -> Hash[String, untyped]?
235
+ def color: (String token, ?dark: bool) -> Color?
236
+ end
237
+
238
+ class SelfUser < Model
239
+ def id: () -> String
240
+ def name: () -> String
241
+ def first_name: () -> String?
242
+ def last_name: () -> String?
243
+ def email_address: () -> String?
244
+ def admin?: () -> bool
245
+ def presence: () -> String?
246
+ end
247
+
248
+ class Tag < Model
249
+ def id: () -> String
250
+ def name: () -> String
251
+ def color_hex: () -> String?
252
+ def tribe?: () -> bool
253
+ def color: () -> Color?
254
+ end
255
+
256
+ class TribeIdentification < Model
257
+ def private?: () -> bool
258
+ def tag: () -> Tag?
23
259
  end
24
260
 
25
- class Venue
26
- attr_reader data: Hash[String, untyped]
261
+ class Locale < Model
262
+ def id: () -> String
263
+ def name: () -> String
264
+ def label: () -> String?
265
+ def city_names: () -> Array[String]
266
+ def banner_url: () -> String?
267
+ def place_id: () -> String?
268
+ end
269
+
270
+ class Location < Model
271
+ def id: () -> String?
272
+ def address: () -> String?
273
+ def place_id: () -> String?
274
+ def coordinate: () -> Coordinate?
275
+ end
276
+
277
+ class Money < Model
278
+ def cents: () -> Integer
279
+ SYMBOLS: Hash[String, String]
280
+ def currency: () -> String
281
+ def amount: () -> Float
282
+ def format: () -> String
283
+ def to_s: () -> String
284
+ end
285
+
286
+ class AdmissionOffer < Model
287
+ def price: () -> Money?
288
+ def url: () -> String?
289
+ def seller_key: () -> String?
290
+ def seller_name: () -> String?
291
+ end
292
+
293
+ class ChatMessage < Model
294
+ def id: () -> String
295
+ def name: () -> String?
296
+ def user_id: () -> String?
297
+ def avatar_url: () -> String?
298
+ def photo_url: () -> String?
299
+ def sent_at: () -> Time?
300
+ def role: () -> String?
301
+ def kind: () -> String?
302
+ def title: () -> String?
303
+ def pinned?: () -> bool
304
+ def body: () -> String?
305
+ end
306
+
307
+ class Venue < Model
308
+ def id: () -> String
309
+ def name: () -> String
310
+ def hidden?: () -> bool
311
+ def order: () -> Integer?
312
+ def photo_url: () -> String?
313
+ def banner_url: () -> String?
314
+ def locale: () -> Locale?
315
+ def location: () -> Location?
316
+ def tags: () -> Array[Tag]
317
+ def facebook_page: () -> Page?
318
+ def description: () -> String?
319
+ def address: () -> String?
320
+ def phone: () -> String?
321
+ def website: () -> String?
322
+ def social_links: () -> Array[Hash[String, untyped]]
323
+ def recent_messages: () -> Array[ChatMessage]
324
+ def upcoming_events: () -> Array[Event]
325
+ def chat_open: () -> bool?
326
+ def coordinate: () -> Coordinate?
27
327
  def self.find: (untyped id) -> Venue
28
- def initialize: (Hash[String, untyped] data) -> void
328
+ end
329
+
330
+ class Person < Model
331
+ def id: () -> String
332
+ def name: () -> String
333
+ def avatar_url: () -> String?
334
+ def banner_url: () -> String?
335
+ def order: () -> Integer?
336
+ def global?: () -> bool
337
+ def like_required?: () -> bool
338
+ def tags: () -> Array[Tag]
339
+ def locales: () -> Array[Locale]
340
+ def facebook_page: () -> Page?
341
+ def home_venue: () -> Venue?
342
+ def involvements: () -> Array[Hash[String, untyped]]
343
+ end
344
+
345
+ class CoverCharge < Model
346
+ def amount: () -> Money?
347
+ def fee: () -> Money?
348
+ def total: () -> Money?
349
+ def night: () -> String?
350
+ def from: () -> Time?
351
+ def payable?: () -> bool
352
+ def event: () -> Hash[String, untyped]?
353
+ def coat_check: () -> Hash[String, untyped]?
354
+ def scale_min: () -> Money?
355
+ def scale_max: () -> Money?
356
+ def scale_suggested: () -> Money?
357
+ def sliding_scale?: () -> bool
358
+ def coat_check?: () -> bool
359
+ end
360
+
361
+ class Event < Model
362
+ def id: () -> String
363
+ def name: () -> String
364
+ def description: () -> String?
365
+ def start_at: () -> Time?
366
+ def end_at: () -> Time?
367
+ def featured?: () -> bool
368
+ def canceled?: () -> bool
369
+ def banner_url: () -> String?
370
+ def source_url: () -> String?
371
+ def locale: () -> Locale?
372
+ def tags: () -> Array[Tag]
373
+ def venue_name: () -> String?
374
+ def venue: () -> Venue?
375
+ def rsvp: () -> String?
376
+ def rsvp_count: () -> Integer?
377
+ def hosts: () -> Array[Profile]
378
+ def lineup: () -> Array[Profile]
379
+ def jockeys: () -> Array[Profile]
380
+ def jockey_label: () -> String?
381
+ def ticket_url: () -> String?
382
+ def offers: () -> Array[AdmissionOffer]
383
+ def cover: () -> CoverCharge?
384
+ def effective_hosts: () -> Array[Profile]
385
+ def ended?: (?Time at) -> bool
386
+ def self.find: (untyped id) -> Event
387
+ end
388
+
389
+ class EventSeries < Model
390
+ def id: () -> String
391
+ def name: () -> String
392
+ def description: () -> String?
393
+ def recurrence_text: () -> String?
394
+ def starts_on: () -> String?
395
+ def start_time: () -> String?
396
+ def time_zone: () -> String?
397
+ def duration_minutes: () -> Integer?
398
+ def banner_url: () -> String?
399
+ def locale: () -> Locale?
400
+ def tags: () -> Array[Tag]
401
+ def venue_name: () -> String?
402
+ def venue: () -> Venue?
403
+ end
404
+
405
+ class EventRSVP < Model
406
+ def count: () -> Integer
407
+ def mine: () -> String?
408
+ def mine_source: () -> String?
409
+ def going: () -> Integer?
410
+ def interested: () -> Integer?
411
+ def tickets: () -> Integer?
412
+ def attendees: () -> Array[Hash[String, untyped]]
413
+ def going?: () -> bool
414
+ def attendee_profiles: () -> Array[Profile]
415
+ end
416
+
417
+ class Admission < Model
418
+ def id: () -> String
419
+ def status: () -> String
420
+ def kind: () -> String
421
+ def night: () -> String?
422
+ def quantity: () -> Integer
423
+ def tier: () -> String?
424
+ def claim_check_number: () -> String?
425
+ def amount: () -> Money?
426
+ def fee: () -> Money?
427
+ def total: () -> Money?
428
+ def refundable?: () -> bool
429
+ def pass_secret: () -> String?
430
+ def scan_count: () -> Integer
431
+ def checked_in_at: () -> Time?
432
+ def created_at: () -> Time?
433
+ def profile: () -> Profile?
434
+ def venue: () -> Hash[String, untyped]?
435
+ def event: () -> Hash[String, untyped]?
436
+ def paid?: () -> bool
437
+ def pass_code: (?Integer? epoch_seconds) -> String?
438
+ end
439
+
440
+ class CoverPurchase < Model
441
+ def admission: () -> Admission?
442
+ def provider: () -> String?
443
+ def payment_intent_client_secret: () -> String?
444
+ def publishable_key: () -> String?
445
+ def stripe_account_id: () -> String?
446
+ def square_application_id: () -> String?
447
+ def square_location_id: () -> String?
448
+ end
449
+
450
+ class VenueCover < Model
451
+ def id: () -> String
452
+ def name: () -> String
453
+ def charge: () -> CoverCharge?
454
+ def viewer_admission: () -> Admission?
455
+ def viewer_coat_check: () -> Admission?
456
+ end
457
+
458
+ class Publication < Model
459
+ def id: () -> String
460
+ def name: () -> String
461
+ def masthead: () -> String?
462
+ def about: () -> String?
463
+ def website_url: () -> String?
464
+ def photo_url: () -> String?
465
+ def trusted?: () -> bool
466
+ def accepts_op_eds?: () -> bool
467
+ def op_ed_guidelines: () -> String?
468
+ def locale: () -> Locale?
469
+ def person: () -> Profile?
470
+ def ad_free_offered?: () -> bool
471
+ def ad_free_tip_cents: () -> Integer?
472
+ def ad_free_days: () -> Integer?
473
+ end
474
+
475
+ class Article < Model
476
+ def id: () -> String
477
+ def slug: () -> String?
478
+ def title: () -> String
479
+ def summary: () -> String?
480
+ def byline: () -> String?
481
+ def kind: () -> String?
482
+ def published_at: () -> Time?
483
+ def edited?: () -> bool
484
+ def pinned?: () -> bool
485
+ def teaser?: () -> bool
486
+ def canonical_url: () -> String?
487
+ def disclosure: () -> String?
488
+ def hero_photo_url: () -> String?
489
+ def hero_alt_text: () -> String?
490
+ def publication: () -> Publication?
491
+ def body: () -> String?
492
+ def viewer_ad_free?: () -> bool
493
+ def featured_nationally?: () -> bool
494
+ def status: () -> String?
495
+ def review_note: () -> String?
496
+ def submitted_at: () -> Time?
497
+ def subjects: () -> Hash[String, Array[Hash[String, untyped]]]
498
+ end
499
+
500
+ class PublicListing < Model
501
+ def kind: () -> String
502
+ def id: () -> String
503
+ def path: () -> String?
504
+ def visibility: () -> String?
505
+ def title: () -> String?
506
+ def description: () -> String?
507
+ def address: () -> String?
508
+ def phone: () -> String?
509
+ def website: () -> String?
510
+ def listed: () -> bool?
511
+ def image: () -> String?
512
+ def start_at: () -> Time?
513
+ def end_at: () -> Time?
514
+ def venue_name: () -> String?
515
+ def ticket_url: () -> String?
516
+ def canceled: () -> bool?
517
+ def cover_cents: () -> Integer?
518
+ def public?: () -> bool
519
+ end
520
+
521
+ class CalendarFeed < Model
522
+ def url: () -> String
523
+ def webcal_url: () -> String
524
+ def google_url: () -> String
525
+ def venue_ids: () -> Array[String]
526
+ def follows?: (String venue_id) -> bool
527
+ end
528
+
529
+ class PublicListingsPage
530
+ attr_reader listings: Array[PublicListing]
531
+ attr_reader page_count: Integer
532
+ attr_reader next_page: Integer?
533
+ def self.from_h: (json json) -> PublicListingsPage
534
+ end
535
+
536
+ class ArticlesPage
537
+ attr_reader articles: Array[Article]
538
+ attr_reader end_cursor: String?
539
+ attr_reader next_page: bool
540
+ def self.from_connection: (json? connection) -> ArticlesPage
541
+ def next_page?: () -> bool
542
+ end
543
+
544
+ class Community
545
+ attr_reader audience: Audience?
546
+ attr_reader locales: Array[Locale]
547
+ attr_reader venues: Array[Venue]
548
+ attr_reader people: Array[Person]
549
+ attr_reader events: Array[Event]
550
+ attr_reader event_series: Array[EventSeries]
551
+ end
552
+
553
+ class ReportResult
554
+ attr_reader reported: bool
555
+ attr_reader blocked: bool
556
+ def reported?: () -> bool
557
+ def blocked?: () -> bool
558
+ end
559
+
560
+ class Tribes
561
+ attr_reader tribes: Array[Tag]
562
+ attr_reader mine: Array[TribeIdentification]
563
+ end
564
+
565
+ module Queries
566
+ def self.all: () -> Hash[String, String]
567
+ def self.report_location: (String fields) -> String
568
+ def self.chat_room: (Symbol | String kind, ?watch: bool) -> String
569
+ def self.event_fields: (SchemaShape shape) -> String
570
+ def self.venue_fields: (SchemaShape shape) -> String
571
+ def self.locale_fields: (SchemaShape shape) -> String
572
+ def self.article_fields: (SchemaShape shape) -> String
573
+ def self.articles_about: (Symbol | String topic) -> [String, ^(SchemaShape) -> String]
574
+ end
575
+
576
+ module Operations
577
+ def audience: () -> Audience
578
+ def me: () -> SelfUser?
579
+ def venues: () -> Array[Venue]
580
+ def people: () -> Array[Person]
581
+ def locales: () -> Array[Locale]
582
+ def closest_locale: (Coordinate near) -> Locale?
583
+ def report_location: (Coordinate position, String fields) -> json
584
+ def community: () -> Community
585
+ def events: (?window: String, ?locale_id: String?, ?venue_id: String?, ?first: Integer) -> Array[Event]
586
+ def event: (String id) -> Event?
587
+ def event_series: (?locale_id: String?, ?venue_id: String?, ?first: Integer) -> Array[EventSeries]
588
+ def venue_detail: (String id, ?recent_messages: Integer) -> Venue?
589
+ def node_type: (String id) -> String?
590
+ def public_listings_page: (?Integer page) -> PublicListingsPage
591
+ def public_listings: () -> Array[PublicListing]
592
+ def public_listing: (String | Symbol kind, String id) -> PublicListing?
593
+ def public_tonight: (String venue_id) -> json
594
+ def rsvp_event: (String event_id, String state) -> String
595
+ def cancel_rsvp: (String event_id) -> EventRSVP
596
+ def event_rsvp: (String event_id, ?first: Integer) -> EventRSVP?
597
+ def tribes: () -> Tribes
598
+ def identify_with_tribe: (String tag_id, ?private: bool?) -> Array[TribeIdentification]
599
+ def leave_tribe: (String tag_id) -> Array[TribeIdentification]
600
+ def register_device: (String notification_token, ?app_id: String?, ?sandbox: bool?) -> bool
601
+ def venue_cover: (String venue_id) -> VenueCover?
602
+ def venue_offers: (String venue_id, ?night: String?) -> Array[AdmissionOffer]
603
+ def admissions: () -> Array[Admission]
604
+ def buy_cover: (String venue_id, ?amount_cents: Integer?, ?currency: String) -> CoverPurchase
605
+ def buy_coat_check: (String venue_id, ?quantity: Integer) -> CoverPurchase
606
+ def pay_cover: (String admission_id, source_id: String, ?verification_token: String?) -> Admission
607
+ def confirm_cover: (String admission_id) -> Admission
608
+ def refund_admission: (String admission_id) -> Admission
609
+ def articles: (?locale_id: String?, ?publication_id: String?, ?first: Integer?) -> Array[Article]
610
+ def articles_page: (?locale_id: String?, ?publication_id: String?, ?first: Integer, ?after: String?) -> ArticlesPage
611
+ def national_articles: (?locale_id: String?, ?first: Integer?) -> Array[Article]
612
+ def article: (String id) -> Article?
613
+ def articles_about: (String | Symbol topic, String id, ?first: Integer?) -> Array[Article]
614
+ def publications: () -> Array[Publication]
615
+ def local_publications: (String locale_id) -> Array[Publication]
616
+ def publication: (String id) -> Publication?
617
+ def my_op_eds: () -> Array[Article]
618
+ def submit_op_ed: (String publication_id, title: String, body: String, ?summary: String?, ?byline: String?) -> Article
619
+ def calendar_feed: () -> CalendarFeed?
620
+ def create_calendar_feed: (?reset: bool) -> CalendarFeed
621
+ def follow_venue_in_calendar: (String venue_id, ?following: bool) -> CalendarFeed
622
+ def delete_calendar_feed: () -> bool
623
+ def send_chat_message: (String message, ?venue_id: String?, ?locale_id: String?, ?prompt_id: String?) -> ChatMessage
624
+ def remove_chat_message: (String message_id) -> String
625
+ def report_content: (String target_type, String id, ?reason: String?, ?block: bool) -> ReportResult
626
+ def block_user: (String user_id) -> nil
627
+ def unblock_user: (String user_id) -> nil
628
+ end
629
+
630
+ class Session
631
+ include Operations
632
+ SERVICE_RENEW_BEFORE: Integer
633
+ attr_reader configuration: Configuration
634
+ def initialize: (?configuration: Configuration, ?store: _CredentialStore, ?http: untyped) -> void
635
+ def self.from_env: (?Hash[String, String] env, ?http: untyped) -> Session
636
+ def self.build: (configuration: Configuration, ?token: String?, ?http: untyped) -> Session
637
+ def self.describe: (String document, String? operation_name) -> [String, String?]
638
+ def signed_in?: () -> bool
639
+ def credential: () -> Credential?
640
+ def session_token: () -> String?
641
+ def sign_in_with_facebook_token: (String access_token, device: DeviceDescription) -> Credential
642
+ def sign_in_with_facebook_code: (String code, redirect_uri: String, device: DeviceDescription, ?facebook_app_id: String?) -> Credential
643
+ def sign_in_with_google: (String id_token, device: DeviceDescription, ?name: String?, ?access_token: String?) -> Credential
644
+ def connect_google: (String id_token, device: DeviceDescription) -> Credential
645
+ def sign_in_with_apple: (String identity_token, device: DeviceDescription, ?authorization_code: String?,
646
+ ?redirect_uri: String?, ?nonce: String?, ?first_name: String?, ?last_name: String?) -> Credential
647
+ def sign_in_with_review_code: (String code, device: DeviceDescription) -> Credential
648
+ def connect_facebook: (String code, redirect_uri: String, device: DeviceDescription) -> Credential
649
+ def refresh_session: () -> Credential
650
+ def use_service_token: (String service_token) -> Credential
651
+ def use_bearer_token: (String token) -> Credential
652
+ def adopt: (Credential credential) -> Credential
653
+ def switch_audience: (String audience_id) -> Credential
654
+ def sign_out: () -> void
655
+ def delete_account: () -> bool
656
+ def session_rejected: (String? token) -> bool
657
+ def branding: (?host: String?, ?app: String?) -> json
658
+ def audience_id: () -> String
659
+ def graphql: (String document, ?json? variables, ?operation_name: String?, ?endpoint: String) -> json
660
+ def shaped_graphql: (Array[String] types, json? variables, String operation_name) { (SchemaShape) -> String } -> json
661
+ def schema_fields: (Array[String] types, ?endpoint: String) -> Hash[String, Array[String]]
662
+ def cached_schema_fields: (Array[String] types, ?endpoint: String) -> Hash[String, Array[String]]?
663
+ def request: (String path, ?method: Symbol, ?query: Hash[String, untyped], ?body: untyped, ?authenticated: bool,
664
+ ?headers: Hash[String, String], ?base_url: String?) -> String
665
+ def url: (String? string) -> String?
29
666
  end
30
667
  end
31
668
  end