onehook-api-client 1.0.11 → 1.0.14

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.
Files changed (47) hide show
  1. package/README.md +56 -0
  2. package/dist-cjs/OneHook.js +16 -0
  3. package/dist-cjs/commands/DeletePushTokenCommand.js +21 -0
  4. package/dist-cjs/commands/GetChatSettingsCommand.js +21 -0
  5. package/dist-cjs/commands/GetCredentialReadinessCommand.js +21 -0
  6. package/dist-cjs/commands/GetNotificationPreferencesCommand.js +21 -0
  7. package/dist-cjs/commands/GetUserIdByUsernameCommand.js +21 -0
  8. package/dist-cjs/commands/RegisterPushTokenCommand.js +21 -0
  9. package/dist-cjs/commands/SwipeByUsernameCommand.js +21 -0
  10. package/dist-cjs/commands/UpdateChatSettingsCommand.js +21 -0
  11. package/dist-cjs/commands/index.js +8 -0
  12. package/dist-cjs/graphql/types.js +6 -1
  13. package/dist-cjs/models/models_0.js +17 -6
  14. package/dist-cjs/protocols/Aws_restJson1.js +304 -3
  15. package/dist-es/OneHook.js +16 -0
  16. package/dist-es/commands/DeletePushTokenCommand.js +17 -0
  17. package/dist-es/commands/GetChatSettingsCommand.js +17 -0
  18. package/dist-es/commands/GetCredentialReadinessCommand.js +17 -0
  19. package/dist-es/commands/GetNotificationPreferencesCommand.js +17 -0
  20. package/dist-es/commands/GetUserIdByUsernameCommand.js +17 -0
  21. package/dist-es/commands/RegisterPushTokenCommand.js +17 -0
  22. package/dist-es/commands/SwipeByUsernameCommand.js +17 -0
  23. package/dist-es/commands/UpdateChatSettingsCommand.js +17 -0
  24. package/dist-es/commands/index.js +8 -0
  25. package/dist-es/graphql/types.js +5 -0
  26. package/dist-es/models/models_0.js +16 -5
  27. package/dist-es/protocols/Aws_restJson1.js +286 -1
  28. package/dist-types/OneHook.d.ts +58 -0
  29. package/dist-types/OneHookClient.d.ts +10 -2
  30. package/dist-types/commands/DeletePushTokenCommand.d.ts +85 -0
  31. package/dist-types/commands/GetChatSettingsCommand.d.ts +85 -0
  32. package/dist-types/commands/GetCredentialReadinessCommand.d.ts +93 -0
  33. package/dist-types/commands/GetMyProfileCommand.d.ts +4 -1
  34. package/dist-types/commands/GetNotificationPreferencesCommand.d.ts +91 -0
  35. package/dist-types/commands/GetPreferencesCommand.d.ts +37 -1
  36. package/dist-types/commands/GetProfileCommand.d.ts +4 -1
  37. package/dist-types/commands/GetUserIdByUsernameCommand.d.ts +84 -0
  38. package/dist-types/commands/RegisterPushTokenCommand.d.ts +93 -0
  39. package/dist-types/commands/SwipeByUsernameCommand.d.ts +93 -0
  40. package/dist-types/commands/UpdateChatSettingsCommand.d.ts +95 -0
  41. package/dist-types/commands/UpdatePreferencesCommand.d.ts +37 -1
  42. package/dist-types/commands/UpdateProfileCommand.d.ts +4 -1
  43. package/dist-types/commands/index.d.ts +8 -0
  44. package/dist-types/graphql/types.d.ts +33 -0
  45. package/dist-types/models/models_0.d.ts +466 -13
  46. package/dist-types/protocols/Aws_restJson1.d.ts +72 -0
  47. package/package.json +1 -1
@@ -48,6 +48,120 @@ export declare class InternalServerError extends __BaseException {
48
48
  */
49
49
  constructor(opts: __ExceptionOptionType<InternalServerError, __BaseException>);
50
50
  }
51
+ /**
52
+ * @public
53
+ */
54
+ export interface DeletePushTokenRequest {
55
+ /**
56
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
57
+ * @public
58
+ */
59
+ deviceId: string | undefined;
60
+ }
61
+ /**
62
+ * @public
63
+ */
64
+ export interface DeletePushTokenResponse {
65
+ /**
66
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
67
+ * @public
68
+ */
69
+ deviceId: string | undefined;
70
+ /**
71
+ * True when a token row was removed; false when there was none. Safe to expose because this is the
72
+ * caller's OWN device.
73
+ * @public
74
+ */
75
+ deleted: boolean | undefined;
76
+ }
77
+ /**
78
+ * @public
79
+ */
80
+ export declare class NotFoundError extends __BaseException {
81
+ readonly name: "NotFoundError";
82
+ readonly $fault: "client";
83
+ error: string | undefined;
84
+ /**
85
+ * @internal
86
+ */
87
+ constructor(opts: __ExceptionOptionType<NotFoundError, __BaseException>);
88
+ }
89
+ /**
90
+ * @public
91
+ */
92
+ export interface GetChatSettingsRequest {
93
+ }
94
+ /**
95
+ * @public
96
+ * @enum
97
+ */
98
+ export declare const LastSeenVisibility: {
99
+ readonly EVERYONE: "EVERYONE";
100
+ readonly MATCHES: "MATCHES";
101
+ readonly NOBODY: "NOBODY";
102
+ };
103
+ /**
104
+ * @public
105
+ */
106
+ export type LastSeenVisibility = typeof LastSeenVisibility[keyof typeof LastSeenVisibility];
107
+ /**
108
+ * Per-user chat settings, synced across all of the user's devices. Members are individually
109
+ * optional so the same shape serves partial updates; a GET response always populates every member.
110
+ * @public
111
+ */
112
+ export interface ChatSettings {
113
+ /**
114
+ * Whether new-message push notifications are delivered.
115
+ * @public
116
+ */
117
+ messageNotifications?: boolean | undefined;
118
+ /**
119
+ * Whether notifications include a message preview (vs. a generic "New message").
120
+ * @public
121
+ */
122
+ showPreviews?: boolean | undefined;
123
+ /**
124
+ * Whether reaction push notifications are delivered.
125
+ * @public
126
+ */
127
+ reactionNotifications?: boolean | undefined;
128
+ /**
129
+ * Whether the caller emits read receipts to peers. (Client/AppSync-enforced — see service docs.)
130
+ * @public
131
+ */
132
+ readReceipts?: boolean | undefined;
133
+ /**
134
+ * Whether the caller emits typing indicators to peers. (Client/AppSync-enforced.)
135
+ * @public
136
+ */
137
+ typingIndicators?: boolean | undefined;
138
+ /**
139
+ * Who may see the caller's last-seen presence.
140
+ * @public
141
+ */
142
+ lastSeenVisibility?: LastSeenVisibility | undefined;
143
+ /**
144
+ * Whether the client applies OS screenshot protection to chats.
145
+ * @public
146
+ */
147
+ screenshotProtection?: boolean | undefined;
148
+ /**
149
+ * Default disappearing-message timer in seconds for new conversations. 0 disables it.
150
+ * @public
151
+ */
152
+ defaultDisappearingSeconds?: number | undefined;
153
+ }
154
+ /**
155
+ * @public
156
+ */
157
+ export interface GetChatSettingsResponse {
158
+ /**
159
+ * Per-user chat settings, synced across all of the user's devices. Members are individually
160
+ * optional so the same shape serves partial updates; a GET response always populates every member.
161
+ * @public
162
+ */
163
+ settings: ChatSettings | undefined;
164
+ }
51
165
  /**
52
166
  * @public
53
167
  */
@@ -141,18 +255,6 @@ export interface GetParticipantRegistryResponse {
141
255
  */
142
256
  accountHistoryKey?: AccountHistoryKey | undefined;
143
257
  }
144
- /**
145
- * @public
146
- */
147
- export declare class NotFoundError extends __BaseException {
148
- readonly name: "NotFoundError";
149
- readonly $fault: "client";
150
- error: string | undefined;
151
- /**
152
- * @internal
153
- */
154
- constructor(opts: __ExceptionOptionType<NotFoundError, __BaseException>);
155
- }
156
258
  /**
157
259
  * @public
158
260
  */
@@ -234,6 +336,44 @@ export interface RegisterDeviceResponse {
234
336
  */
235
337
  ownsAccountHistoryKey: boolean | undefined;
236
338
  }
339
+ /**
340
+ * @public
341
+ */
342
+ export interface RegisterPushTokenRequest {
343
+ /**
344
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
345
+ * @public
346
+ */
347
+ deviceId: string | undefined;
348
+ /**
349
+ * The APNs device token or FCM registration token, as issued by the platform.
350
+ * @public
351
+ */
352
+ token: string | undefined;
353
+ /**
354
+ * Which push service issued the token. Decides which SNS platform application the endpoint is
355
+ * created against, so a wrong value means the push silently never arrives.
356
+ * @public
357
+ */
358
+ platform: Platform | undefined;
359
+ }
360
+ /**
361
+ * @public
362
+ */
363
+ export interface RegisterPushTokenResponse {
364
+ /**
365
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
366
+ * @public
367
+ */
368
+ deviceId: string | undefined;
369
+ /**
370
+ * True once the token is stored. Deliberately does NOT report whether an SNS endpoint was created:
371
+ * endpoint creation happens at delivery time, so claiming it here would assert something the
372
+ * registration call has not verified.
373
+ * @public
374
+ */
375
+ registered: boolean | undefined;
376
+ }
237
377
  /**
238
378
  * @public
239
379
  */
@@ -255,6 +395,34 @@ export interface RevokeDeviceResponse {
255
395
  deviceId: string | undefined;
256
396
  revoked: boolean | undefined;
257
397
  }
398
+ /**
399
+ * @public
400
+ */
401
+ export interface UpdateChatSettingsRequest {
402
+ messageNotifications?: boolean | undefined;
403
+ showPreviews?: boolean | undefined;
404
+ reactionNotifications?: boolean | undefined;
405
+ readReceipts?: boolean | undefined;
406
+ typingIndicators?: boolean | undefined;
407
+ /**
408
+ * Who may see the caller's "last seen / online" presence.
409
+ * @public
410
+ */
411
+ lastSeenVisibility?: LastSeenVisibility | undefined;
412
+ screenshotProtection?: boolean | undefined;
413
+ defaultDisappearingSeconds?: number | undefined;
414
+ }
415
+ /**
416
+ * @public
417
+ */
418
+ export interface UpdateChatSettingsResponse {
419
+ /**
420
+ * Per-user chat settings, synced across all of the user's devices. Members are individually
421
+ * optional so the same shape serves partial updates; a GET response always populates every member.
422
+ * @public
423
+ */
424
+ settings: ChatSettings | undefined;
425
+ }
258
426
  /**
259
427
  * @public
260
428
  */
@@ -285,6 +453,41 @@ export interface GenerateInviteResponse {
285
453
  expiresAt: number | undefined;
286
454
  maxUses: number | undefined;
287
455
  }
456
+ /**
457
+ * @public
458
+ */
459
+ export interface GetCredentialReadinessRequest {
460
+ userId: string | undefined;
461
+ }
462
+ /**
463
+ * @public
464
+ * @enum
465
+ */
466
+ export declare const CredentialGap: {
467
+ readonly NO_COGNITO_USERNAME_ON_PROFILE: "NO_COGNITO_USERNAME_ON_PROFILE";
468
+ readonly PHONE_NOT_VERIFIED: "PHONE_NOT_VERIFIED";
469
+ readonly USERNAME_MISMATCHED_IN_COGNITO: "USERNAME_MISMATCHED_IN_COGNITO";
470
+ readonly USERNAME_NOT_SYNCED_TO_COGNITO: "USERNAME_NOT_SYNCED_TO_COGNITO";
471
+ };
472
+ /**
473
+ * @public
474
+ */
475
+ export type CredentialGap = typeof CredentialGap[keyof typeof CredentialGap];
476
+ /**
477
+ * @public
478
+ */
479
+ export interface GetCredentialReadinessResponse {
480
+ /**
481
+ * True only when EVERY portable credential the profile advertises is live in Cognito.
482
+ * @public
483
+ */
484
+ ready: boolean | undefined;
485
+ /**
486
+ * Empty when ready. Machine-readable so the caller can explain the specific gap.
487
+ * @public
488
+ */
489
+ gaps: (CredentialGap)[] | undefined;
490
+ }
288
491
  /**
289
492
  * @public
290
493
  */
@@ -312,6 +515,18 @@ export interface UserResponse {
312
515
  export interface GetUserByEmailRequest {
313
516
  email: string | undefined;
314
517
  }
518
+ /**
519
+ * @public
520
+ */
521
+ export interface GetUserIdByUsernameRequest {
522
+ username: string | undefined;
523
+ }
524
+ /**
525
+ * @public
526
+ */
527
+ export interface GetUserIdByUsernameResponse {
528
+ userId: string | undefined;
529
+ }
315
530
  /**
316
531
  * @public
317
532
  */
@@ -513,6 +728,23 @@ export interface DiscoverResponse {
513
728
  count: number | undefined;
514
729
  algorithm: string | undefined;
515
730
  }
731
+ /**
732
+ * @public
733
+ */
734
+ export interface GetNotificationPreferencesRequest {
735
+ userId: string | undefined;
736
+ }
737
+ /**
738
+ * ONLY the notification toggles. See `GetNotificationPreferences` for why this is deliberately not the
739
+ * full preferences projection.
740
+ * @public
741
+ */
742
+ export interface GetNotificationPreferencesResponse {
743
+ userId: string | undefined;
744
+ notifyMatches: boolean | undefined;
745
+ notifyLikes: boolean | undefined;
746
+ notifyDailyPicks: boolean | undefined;
747
+ }
516
748
  /**
517
749
  * @public
518
750
  */
@@ -527,7 +759,52 @@ export interface UserPreferencesResponse {
527
759
  minAge?: number | undefined;
528
760
  maxAge?: number | undefined;
529
761
  maxDistanceKm?: number | undefined;
530
- genders?: (string)[] | undefined;
762
+ /**
763
+ * Genders to show. CANONICAL name — what the service serialises.
764
+ * @public
765
+ */
766
+ interestedInGenders?: (string)[] | undefined;
767
+ relationshipType?: string | undefined;
768
+ wantsKids?: string | undefined;
769
+ familyPlans?: string | undefined;
770
+ verifiedOnly?: boolean | undefined;
771
+ smoking?: string | undefined;
772
+ drinking?: string | undefined;
773
+ cannabis?: string | undefined;
774
+ drugs?: string | undefined;
775
+ exercise?: string | undefined;
776
+ religion?: string | undefined;
777
+ educationLevel?: string | undefined;
778
+ politicalView?: string | undefined;
779
+ starSigns?: (string)[] | undefined;
780
+ preferredLanguages?: (string)[] | undefined;
781
+ interests?: (string)[] | undefined;
782
+ minHeight?: number | undefined;
783
+ maxHeight?: number | undefined;
784
+ /**
785
+ * Which filters are hard deal-breakers rather than soft preferences.
786
+ * @public
787
+ */
788
+ dealbreakers?: (string)[] | undefined;
789
+ requirePhoto?: boolean | undefined;
790
+ requireBio?: boolean | undefined;
791
+ requireRecentlyActive?: boolean | undefined;
792
+ /**
793
+ * Server-owned definition of "recently active", in days. Read-only: the client shows it,
794
+ * the server decides it.
795
+ * @public
796
+ */
797
+ recentlyActiveDays?: number | undefined;
798
+ discoverable?: boolean | undefined;
799
+ incognito?: boolean | undefined;
800
+ /**
801
+ * KM | MI. Display only — the API always speaks kilometres.
802
+ * @public
803
+ */
804
+ distanceUnit?: string | undefined;
805
+ notifyMatches?: boolean | undefined;
806
+ notifyLikes?: boolean | undefined;
807
+ notifyDailyPicks?: boolean | undefined;
531
808
  }
532
809
  /**
533
810
  * @public
@@ -569,6 +846,24 @@ export interface SwipeResponse {
569
846
  */
570
847
  matchId?: string | undefined;
571
848
  }
849
+ /**
850
+ * @public
851
+ */
852
+ export interface SwipeByUsernameRequest {
853
+ /**
854
+ * The handle the user typed. Case/whitespace are normalised server-side.
855
+ * @public
856
+ */
857
+ username: string | undefined;
858
+ }
859
+ /**
860
+ * Intentionally minimal — see `SwipeByUsername`. One constant status, no target id, no `matched`
861
+ * flag, no "user not found": anything more would turn a handle into an oracle.
862
+ * @public
863
+ */
864
+ export interface SwipeByUsernameResponse {
865
+ status: string | undefined;
866
+ }
572
867
  /**
573
868
  * @public
574
869
  */
@@ -577,7 +872,155 @@ export interface UpdatePreferencesRequest {
577
872
  minAge?: number | undefined;
578
873
  maxAge?: number | undefined;
579
874
  maxDistanceKm?: number | undefined;
875
+ /**
876
+ * Genders to show. CANONICAL name — it is what the service actually binds.
877
+ * Values: MALE | FEMALE | NON_BINARY | OTHER | PREFER_NOT_TO_SAY.
878
+ * @public
879
+ */
880
+ interestedInGenders?: (string)[] | undefined;
881
+ /**
882
+ * DEPRECATED alias for `interestedInGenders`, accepted for already-shipped clients only.
883
+ * The service reads it via `@JsonAlias`; new clients must send `interestedInGenders`.
884
+ *
885
+ * @deprecated
886
+ * @public
887
+ */
580
888
  genders?: (string)[] | undefined;
889
+ /**
890
+ * MONOGAMOUS | POLYAMOROUS | OPEN | CASUAL | ETHICALLY_NON_MONOGAMOUS | NOT_SURE_YET
891
+ * @public
892
+ */
893
+ relationshipType?: string | undefined;
894
+ /**
895
+ * YES | NO | NOT_SURE | OPEN
896
+ * @public
897
+ */
898
+ wantsKids?: string | undefined;
899
+ /**
900
+ * STARTING_SOON | IN_FUTURE | NOT_INTERESTED | ALREADY_HAVE | OPEN
901
+ * @public
902
+ */
903
+ familyPlans?: string | undefined;
904
+ /**
905
+ * Only show candidates who passed the liveness/verification check.
906
+ * @public
907
+ */
908
+ verifiedOnly?: boolean | undefined;
909
+ /**
910
+ * NEVER | SOCIALLY | REGULARLY | TRYING_TO_QUIT
911
+ * @public
912
+ */
913
+ smoking?: string | undefined;
914
+ /**
915
+ * NEVER | SOCIALLY | REGULARLY | PREFER_NOT_TO_SAY
916
+ * @public
917
+ */
918
+ drinking?: string | undefined;
919
+ /**
920
+ * NEVER | SOCIALLY | REGULARLY | PREFER_NOT_TO_SAY
921
+ * @public
922
+ */
923
+ cannabis?: string | undefined;
924
+ /**
925
+ * NEVER | SOCIALLY | REGULARLY | PREFER_NOT_TO_SAY
926
+ * @public
927
+ */
928
+ drugs?: string | undefined;
929
+ /**
930
+ * ACTIVE | SOMETIMES | NEVER
931
+ * @public
932
+ */
933
+ exercise?: string | undefined;
934
+ /**
935
+ * AGNOSTIC | ATHEIST | BUDDHIST | CHRISTIAN | CATHOLIC | HINDU | JEWISH | MUSLIM |
936
+ * SIKH | SPIRITUAL | OTHER | PREFER_NOT_TO_SAY
937
+ * @public
938
+ */
939
+ religion?: string | undefined;
940
+ /**
941
+ * HIGH_SCHOOL | IN_COLLEGE | BACHELORS | MASTERS | PHD | OTHER
942
+ * @public
943
+ */
944
+ educationLevel?: string | undefined;
945
+ /**
946
+ * LIBERAL | MODERATE | CONSERVATIVE | APOLITICAL | OTHER
947
+ * @public
948
+ */
949
+ politicalView?: string | undefined;
950
+ /**
951
+ * Accepted star signs (ARIES … PISCES). A candidate matches on containment.
952
+ * @public
953
+ */
954
+ starSigns?: (string)[] | undefined;
955
+ /**
956
+ * Preferred spoken languages (ENGLISH, SPANISH, …). Matches on overlap.
957
+ * @public
958
+ */
959
+ preferredLanguages?: (string)[] | undefined;
960
+ /**
961
+ * Shared interests (TRAVEL, MUSIC, …). Matches on overlap.
962
+ * @public
963
+ */
964
+ interests?: (string)[] | undefined;
965
+ minHeight?: number | undefined;
966
+ maxHeight?: number | undefined;
967
+ /**
968
+ * Which of the filters above are DEAL-BREAKERS (hard) rather than nice-to-haves (soft).
969
+ *
970
+ * This is the switch that makes a filter exclude candidates instead of merely boosting them:
971
+ * a preference NOT listed here only contributes to the soft score. Use the field names above,
972
+ * e.g. `verifiedOnly`, `relationshipType`, `wantsKids`, `interestedInGenders`, `minAge`,
973
+ * `maxAge`, `age`, `gender`, `height`, `minHeight`, `maxHeight`, `smoking`, `drinking`,
974
+ * `cannabis`, `drugs`, `religion`, `familyPlans`, `exercise`, `educationLevel`,
975
+ * `politicalView`, `interests`, `starSigns`, `preferredLanguages`.
976
+ * @public
977
+ */
978
+ dealbreakers?: (string)[] | undefined;
979
+ /**
980
+ * Require at least one profile photo.
981
+ * @public
982
+ */
983
+ requirePhoto?: boolean | undefined;
984
+ /**
985
+ * Require a bio or at least one answered prompt.
986
+ * @public
987
+ */
988
+ requireBio?: boolean | undefined;
989
+ /**
990
+ * Require activity within the recent-activity window (see `recentlyActiveDays` in the response).
991
+ * @public
992
+ */
993
+ requireRecentlyActive?: boolean | undefined;
994
+ /**
995
+ * Show me on OneHook. When false you browse without appearing in anyone's feed.
996
+ * @public
997
+ */
998
+ discoverable?: boolean | undefined;
999
+ /**
1000
+ * Incognito: only people you have already liked can see you.
1001
+ * @public
1002
+ */
1003
+ incognito?: boolean | undefined;
1004
+ /**
1005
+ * Distance unit for display only — the API always speaks kilometres. KM | MI.
1006
+ * @public
1007
+ */
1008
+ distanceUnit?: string | undefined;
1009
+ /**
1010
+ * Notify me about new matches.
1011
+ * @public
1012
+ */
1013
+ notifyMatches?: boolean | undefined;
1014
+ /**
1015
+ * Notify me when someone likes me.
1016
+ * @public
1017
+ */
1018
+ notifyLikes?: boolean | undefined;
1019
+ /**
1020
+ * Notify me about daily picks.
1021
+ * @public
1022
+ */
1023
+ notifyDailyPicks?: boolean | undefined;
581
1024
  }
582
1025
  /**
583
1026
  * @public
@@ -709,6 +1152,11 @@ export interface ProfileResponse {
709
1152
  verified?: boolean | undefined;
710
1153
  subscriptionTier?: string | undefined;
711
1154
  pictures?: (string)[] | undefined;
1155
+ /**
1156
+ * Display-only preview transforms keyed by picture object key. Values use `v1:x,y,zoom`.
1157
+ * @public
1158
+ */
1159
+ pictureTransforms?: Record<string, string> | undefined;
712
1160
  videos?: (string)[] | undefined;
713
1161
  audioPrompt?: string | undefined;
714
1162
  /**
@@ -764,6 +1212,11 @@ export interface ProfileUpdateRequest {
764
1212
  religion?: string | undefined;
765
1213
  starSign?: string | undefined;
766
1214
  pictures?: (string)[] | undefined;
1215
+ /**
1216
+ * Display-only preview transforms keyed by picture object key. Values use `v1:x,y,zoom`.
1217
+ * @public
1218
+ */
1219
+ pictureTransforms?: Record<string, string> | undefined;
767
1220
  videos?: (string)[] | undefined;
768
1221
  audioPrompt?: string | undefined;
769
1222
  causes?: (string)[] | undefined;