@modainteract/moda-interact-shared 5.0.0 → 5.2.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.
@@ -389,9 +389,9 @@ declare const ShopifyCheckoutCreatedEventV2Schema: z.ZodObject<{
389
389
  internationalContext: z.ZodOptional<z.ZodObject<{
390
390
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
391
391
  languageSource: z.ZodNullable<z.ZodEnum<{
392
+ shopify: "shopify";
392
393
  "customer-explicit": "customer-explicit";
393
394
  detected: "detected";
394
- shopify: "shopify";
395
395
  "merchant-default": "merchant-default";
396
396
  "platform-default": "platform-default";
397
397
  }>>;
@@ -426,9 +426,9 @@ declare const ShopifyCartActivityEventV2Schema: z.ZodObject<{
426
426
  internationalContext: z.ZodOptional<z.ZodObject<{
427
427
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
428
428
  languageSource: z.ZodNullable<z.ZodEnum<{
429
+ shopify: "shopify";
429
430
  "customer-explicit": "customer-explicit";
430
431
  detected: "detected";
431
- shopify: "shopify";
432
432
  "merchant-default": "merchant-default";
433
433
  "platform-default": "platform-default";
434
434
  }>>;
@@ -461,9 +461,9 @@ declare const ShopifyCheckoutUpdatedEventV2Schema: z.ZodObject<{
461
461
  internationalContext: z.ZodOptional<z.ZodObject<{
462
462
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
463
463
  languageSource: z.ZodNullable<z.ZodEnum<{
464
+ shopify: "shopify";
464
465
  "customer-explicit": "customer-explicit";
465
466
  detected: "detected";
466
- shopify: "shopify";
467
467
  "merchant-default": "merchant-default";
468
468
  "platform-default": "platform-default";
469
469
  }>>;
@@ -495,9 +495,9 @@ declare const ShopifyOrderCompletedEventV2Schema: z.ZodObject<{
495
495
  internationalContext: z.ZodOptional<z.ZodObject<{
496
496
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
497
497
  languageSource: z.ZodNullable<z.ZodEnum<{
498
+ shopify: "shopify";
498
499
  "customer-explicit": "customer-explicit";
499
500
  detected: "detected";
500
- shopify: "shopify";
501
501
  "merchant-default": "merchant-default";
502
502
  "platform-default": "platform-default";
503
503
  }>>;
@@ -532,9 +532,9 @@ declare const ShopifyRecoveryEventV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject
532
532
  internationalContext: z.ZodOptional<z.ZodObject<{
533
533
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
534
534
  languageSource: z.ZodNullable<z.ZodEnum<{
535
+ shopify: "shopify";
535
536
  "customer-explicit": "customer-explicit";
536
537
  detected: "detected";
537
- shopify: "shopify";
538
538
  "merchant-default": "merchant-default";
539
539
  "platform-default": "platform-default";
540
540
  }>>;
@@ -565,9 +565,9 @@ declare const ShopifyRecoveryEventV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject
565
565
  internationalContext: z.ZodOptional<z.ZodObject<{
566
566
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
567
567
  languageSource: z.ZodNullable<z.ZodEnum<{
568
+ shopify: "shopify";
568
569
  "customer-explicit": "customer-explicit";
569
570
  detected: "detected";
570
- shopify: "shopify";
571
571
  "merchant-default": "merchant-default";
572
572
  "platform-default": "platform-default";
573
573
  }>>;
@@ -600,9 +600,9 @@ declare const ShopifyRecoveryEventV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject
600
600
  internationalContext: z.ZodOptional<z.ZodObject<{
601
601
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
602
602
  languageSource: z.ZodNullable<z.ZodEnum<{
603
+ shopify: "shopify";
603
604
  "customer-explicit": "customer-explicit";
604
605
  detected: "detected";
605
- shopify: "shopify";
606
606
  "merchant-default": "merchant-default";
607
607
  "platform-default": "platform-default";
608
608
  }>>;
@@ -632,9 +632,9 @@ declare const ShopifyRecoveryEventV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject
632
632
  internationalContext: z.ZodOptional<z.ZodObject<{
633
633
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
634
634
  languageSource: z.ZodNullable<z.ZodEnum<{
635
+ shopify: "shopify";
635
636
  "customer-explicit": "customer-explicit";
636
637
  detected: "detected";
637
- shopify: "shopify";
638
638
  "merchant-default": "merchant-default";
639
639
  "platform-default": "platform-default";
640
640
  }>>;
@@ -677,7 +677,7 @@ declare function safeParseShopifyRecoveryEventV2(input: unknown): z.ZodSafeParse
677
677
  };
678
678
  internationalContext?: {
679
679
  languageTag: string | null;
680
- languageSource: "customer-explicit" | "detected" | "shopify" | "merchant-default" | "platform-default" | null;
680
+ languageSource: "shopify" | "customer-explicit" | "detected" | "merchant-default" | "platform-default" | null;
681
681
  countryCode: string | null;
682
682
  currencyCode: string | null;
683
683
  timeZone: string | null;
@@ -704,7 +704,7 @@ declare function safeParseShopifyRecoveryEventV2(input: unknown): z.ZodSafeParse
704
704
  };
705
705
  internationalContext?: {
706
706
  languageTag: string | null;
707
- languageSource: "customer-explicit" | "detected" | "shopify" | "merchant-default" | "platform-default" | null;
707
+ languageSource: "shopify" | "customer-explicit" | "detected" | "merchant-default" | "platform-default" | null;
708
708
  countryCode: string | null;
709
709
  currencyCode: string | null;
710
710
  timeZone: string | null;
@@ -730,7 +730,7 @@ declare function safeParseShopifyRecoveryEventV2(input: unknown): z.ZodSafeParse
730
730
  };
731
731
  internationalContext?: {
732
732
  languageTag: string | null;
733
- languageSource: "customer-explicit" | "detected" | "shopify" | "merchant-default" | "platform-default" | null;
733
+ languageSource: "shopify" | "customer-explicit" | "detected" | "merchant-default" | "platform-default" | null;
734
734
  countryCode: string | null;
735
735
  currencyCode: string | null;
736
736
  timeZone: string | null;
@@ -759,7 +759,7 @@ declare function safeParseShopifyRecoveryEventV2(input: unknown): z.ZodSafeParse
759
759
  };
760
760
  internationalContext?: {
761
761
  languageTag: string | null;
762
- languageSource: "customer-explicit" | "detected" | "shopify" | "merchant-default" | "platform-default" | null;
762
+ languageSource: "shopify" | "customer-explicit" | "detected" | "merchant-default" | "platform-default" | null;
763
763
  countryCode: string | null;
764
764
  currencyCode: string | null;
765
765
  timeZone: string | null;
@@ -803,9 +803,9 @@ declare const ShopifyCheckoutUpdatedEventV3Schema: z.ZodObject<{
803
803
  internationalContext: z.ZodOptional<z.ZodObject<{
804
804
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
805
805
  languageSource: z.ZodNullable<z.ZodEnum<{
806
+ shopify: "shopify";
806
807
  "customer-explicit": "customer-explicit";
807
808
  detected: "detected";
808
- shopify: "shopify";
809
809
  "merchant-default": "merchant-default";
810
810
  "platform-default": "platform-default";
811
811
  }>>;
@@ -841,9 +841,9 @@ declare const ShopifyRecoveryEventSchema: z.ZodUnion<readonly [z.ZodDiscriminate
841
841
  internationalContext: z.ZodOptional<z.ZodObject<{
842
842
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
843
843
  languageSource: z.ZodNullable<z.ZodEnum<{
844
+ shopify: "shopify";
844
845
  "customer-explicit": "customer-explicit";
845
846
  detected: "detected";
846
- shopify: "shopify";
847
847
  "merchant-default": "merchant-default";
848
848
  "platform-default": "platform-default";
849
849
  }>>;
@@ -874,9 +874,9 @@ declare const ShopifyRecoveryEventSchema: z.ZodUnion<readonly [z.ZodDiscriminate
874
874
  internationalContext: z.ZodOptional<z.ZodObject<{
875
875
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
876
876
  languageSource: z.ZodNullable<z.ZodEnum<{
877
+ shopify: "shopify";
877
878
  "customer-explicit": "customer-explicit";
878
879
  detected: "detected";
879
- shopify: "shopify";
880
880
  "merchant-default": "merchant-default";
881
881
  "platform-default": "platform-default";
882
882
  }>>;
@@ -909,9 +909,9 @@ declare const ShopifyRecoveryEventSchema: z.ZodUnion<readonly [z.ZodDiscriminate
909
909
  internationalContext: z.ZodOptional<z.ZodObject<{
910
910
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
911
911
  languageSource: z.ZodNullable<z.ZodEnum<{
912
+ shopify: "shopify";
912
913
  "customer-explicit": "customer-explicit";
913
914
  detected: "detected";
914
- shopify: "shopify";
915
915
  "merchant-default": "merchant-default";
916
916
  "platform-default": "platform-default";
917
917
  }>>;
@@ -941,9 +941,9 @@ declare const ShopifyRecoveryEventSchema: z.ZodUnion<readonly [z.ZodDiscriminate
941
941
  internationalContext: z.ZodOptional<z.ZodObject<{
942
942
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
943
943
  languageSource: z.ZodNullable<z.ZodEnum<{
944
+ shopify: "shopify";
944
945
  "customer-explicit": "customer-explicit";
945
946
  detected: "detected";
946
- shopify: "shopify";
947
947
  "merchant-default": "merchant-default";
948
948
  "platform-default": "platform-default";
949
949
  }>>;
@@ -976,9 +976,9 @@ declare const ShopifyRecoveryEventSchema: z.ZodUnion<readonly [z.ZodDiscriminate
976
976
  internationalContext: z.ZodOptional<z.ZodObject<{
977
977
  languageTag: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
978
978
  languageSource: z.ZodNullable<z.ZodEnum<{
979
+ shopify: "shopify";
979
980
  "customer-explicit": "customer-explicit";
980
981
  detected: "detected";
981
- shopify: "shopify";
982
982
  "merchant-default": "merchant-default";
983
983
  "platform-default": "platform-default";
984
984
  }>>;
@@ -1020,7 +1020,7 @@ declare function safeParseShopifyRecoveryEvent(input: unknown): z.ZodSafeParseRe
1020
1020
  };
1021
1021
  internationalContext?: {
1022
1022
  languageTag: string | null;
1023
- languageSource: "customer-explicit" | "detected" | "shopify" | "merchant-default" | "platform-default" | null;
1023
+ languageSource: "shopify" | "customer-explicit" | "detected" | "merchant-default" | "platform-default" | null;
1024
1024
  countryCode: string | null;
1025
1025
  currencyCode: string | null;
1026
1026
  timeZone: string | null;
@@ -1047,7 +1047,7 @@ declare function safeParseShopifyRecoveryEvent(input: unknown): z.ZodSafeParseRe
1047
1047
  };
1048
1048
  internationalContext?: {
1049
1049
  languageTag: string | null;
1050
- languageSource: "customer-explicit" | "detected" | "shopify" | "merchant-default" | "platform-default" | null;
1050
+ languageSource: "shopify" | "customer-explicit" | "detected" | "merchant-default" | "platform-default" | null;
1051
1051
  countryCode: string | null;
1052
1052
  currencyCode: string | null;
1053
1053
  timeZone: string | null;
@@ -1073,7 +1073,7 @@ declare function safeParseShopifyRecoveryEvent(input: unknown): z.ZodSafeParseRe
1073
1073
  };
1074
1074
  internationalContext?: {
1075
1075
  languageTag: string | null;
1076
- languageSource: "customer-explicit" | "detected" | "shopify" | "merchant-default" | "platform-default" | null;
1076
+ languageSource: "shopify" | "customer-explicit" | "detected" | "merchant-default" | "platform-default" | null;
1077
1077
  countryCode: string | null;
1078
1078
  currencyCode: string | null;
1079
1079
  timeZone: string | null;
@@ -1102,7 +1102,7 @@ declare function safeParseShopifyRecoveryEvent(input: unknown): z.ZodSafeParseRe
1102
1102
  };
1103
1103
  internationalContext?: {
1104
1104
  languageTag: string | null;
1105
- languageSource: "customer-explicit" | "detected" | "shopify" | "merchant-default" | "platform-default" | null;
1105
+ languageSource: "shopify" | "customer-explicit" | "detected" | "merchant-default" | "platform-default" | null;
1106
1106
  countryCode: string | null;
1107
1107
  currencyCode: string | null;
1108
1108
  timeZone: string | null;
@@ -1131,7 +1131,7 @@ declare function safeParseShopifyRecoveryEvent(input: unknown): z.ZodSafeParseRe
1131
1131
  };
1132
1132
  internationalContext?: {
1133
1133
  languageTag: string | null;
1134
- languageSource: "customer-explicit" | "detected" | "shopify" | "merchant-default" | "platform-default" | null;
1134
+ languageSource: "shopify" | "customer-explicit" | "detected" | "merchant-default" | "platform-default" | null;
1135
1135
  countryCode: string | null;
1136
1136
  currencyCode: string | null;
1137
1137
  timeZone: string | null;
@@ -1,6 +1,295 @@
1
1
  import { b as ShopifyWhatsAppConsentSyncJobV1 } from '../whatsapp-consent-sync.schema-DEU84xTL.js';
2
+ import { C as CredentialKeyring } from '../keyring-BLXjNChq.js';
2
3
  import 'zod';
3
4
 
5
+ type ShopifyOfflineTokenErrorCode = "SESSION_MISSING" | "SESSION_IDENTITY_CONFLICT" | "INVALID_SESSION" | "REFRESH_TOKEN_EXPIRED" | "OAUTH_CONFIG_UNAVAILABLE" | "LOCK_TIMEOUT" | "CANCELLED" | "DEADLINE" | "REFRESH_REJECTED" | "REFRESH_RESPONSE_INVALID" | "REFRESH_OUTCOME_UNKNOWN" | "PERSISTENCE_UNAVAILABLE";
6
+ declare class ShopifyOfflineTokenError extends Error {
7
+ readonly code: ShopifyOfflineTokenErrorCode;
8
+ readonly retryable: boolean;
9
+ constructor(code: ShopifyOfflineTokenErrorCode);
10
+ }
11
+ type ShopifyOfflineSessionRecord = Readonly<{
12
+ id: string;
13
+ shop: string;
14
+ isOnline: boolean;
15
+ accessToken: string | null;
16
+ refreshToken: string | null;
17
+ scope: string | null;
18
+ expires: Date | null;
19
+ refreshTokenExpires: Date | null;
20
+ }>;
21
+ type ShopifyOfflineShopRecord = Readonly<{
22
+ id: string;
23
+ domain: string;
24
+ platform: string;
25
+ status: string;
26
+ }>;
27
+ type ShopifyOfflineStringFilter = string | Readonly<{
28
+ equals?: string;
29
+ in?: string[];
30
+ notIn?: string[];
31
+ lt?: string;
32
+ lte?: string;
33
+ gt?: string;
34
+ gte?: string;
35
+ contains?: string;
36
+ startsWith?: string;
37
+ endsWith?: string;
38
+ mode?: "default" | "insensitive";
39
+ not?: string | ShopifyOfflineStringFilter;
40
+ }>;
41
+ type ShopifyOfflineBooleanFilter = boolean | Readonly<{
42
+ equals?: boolean;
43
+ not?: boolean | ShopifyOfflineBooleanFilter;
44
+ }>;
45
+ type ShopifyOfflineNullableStringFilter = string | null | Readonly<{
46
+ equals?: string | null;
47
+ in?: string[] | null;
48
+ notIn?: string[] | null;
49
+ lt?: string;
50
+ lte?: string;
51
+ gt?: string;
52
+ gte?: string;
53
+ contains?: string;
54
+ startsWith?: string;
55
+ endsWith?: string;
56
+ mode?: "default" | "insensitive";
57
+ not?: string | null | ShopifyOfflineNullableStringFilter;
58
+ }>;
59
+ type ShopifyOfflineNullableBooleanFilter = boolean | null | Readonly<{
60
+ equals?: boolean | null;
61
+ not?: boolean | null | ShopifyOfflineNullableBooleanFilter;
62
+ }>;
63
+ type ShopifyOfflineDateFilter = Date | string | null | Readonly<{
64
+ equals?: Date | string | null;
65
+ in?: Date[] | string[] | null;
66
+ notIn?: Date[] | string[] | null;
67
+ lt?: Date | string;
68
+ lte?: Date | string;
69
+ gt?: Date | string;
70
+ gte?: Date | string;
71
+ not?: Date | string | null | ShopifyOfflineDateFilter;
72
+ }>;
73
+ type ShopifyOfflineBigIntFilter = bigint | number | null | Readonly<{
74
+ equals?: bigint | number | null;
75
+ in?: bigint[] | number[] | null;
76
+ notIn?: bigint[] | number[] | null;
77
+ lt?: bigint | number;
78
+ lte?: bigint | number;
79
+ gt?: bigint | number;
80
+ gte?: bigint | number;
81
+ not?: bigint | number | null | ShopifyOfflineBigIntFilter;
82
+ }>;
83
+ type ShopifyOfflineSessionScalarWhere = {
84
+ id?: ShopifyOfflineStringFilter;
85
+ shop?: ShopifyOfflineStringFilter;
86
+ state?: ShopifyOfflineStringFilter;
87
+ isOnline?: ShopifyOfflineBooleanFilter;
88
+ scope?: ShopifyOfflineNullableStringFilter;
89
+ expires?: ShopifyOfflineDateFilter;
90
+ accessToken?: ShopifyOfflineStringFilter;
91
+ userId?: ShopifyOfflineBigIntFilter;
92
+ firstName?: ShopifyOfflineNullableStringFilter;
93
+ lastName?: ShopifyOfflineNullableStringFilter;
94
+ email?: ShopifyOfflineNullableStringFilter;
95
+ accountOwner?: ShopifyOfflineBooleanFilter;
96
+ locale?: ShopifyOfflineNullableStringFilter;
97
+ collaborator?: ShopifyOfflineNullableBooleanFilter;
98
+ emailVerified?: ShopifyOfflineNullableBooleanFilter;
99
+ refreshToken?: ShopifyOfflineNullableStringFilter;
100
+ refreshTokenExpires?: ShopifyOfflineDateFilter;
101
+ };
102
+ type ShopifyOfflineSessionWhere = ShopifyOfflineSessionScalarWhere & {
103
+ AND?: ShopifyOfflineSessionScalarWhere | ShopifyOfflineSessionScalarWhere[];
104
+ OR?: ShopifyOfflineSessionScalarWhere[];
105
+ NOT?: ShopifyOfflineSessionScalarWhere | ShopifyOfflineSessionScalarWhere[];
106
+ };
107
+ type ShopifyOfflineSessionUniqueWhere = Readonly<{
108
+ id: string;
109
+ }>;
110
+ type ShopifyOfflineSessionSelect = Readonly<Partial<Record<"id" | "shop" | "state" | "isOnline" | "scope" | "expires" | "accessToken" | "userId" | "firstName" | "lastName" | "email" | "accountOwner" | "locale" | "collaborator" | "emailVerified" | "refreshToken" | "refreshTokenExpires", true>>>;
111
+ type ShopifyOfflineSessionData = Readonly<{
112
+ id?: string;
113
+ shop?: string;
114
+ state?: string;
115
+ isOnline?: boolean;
116
+ scope?: string | null;
117
+ expires?: Date | null;
118
+ accessToken?: string;
119
+ userId?: bigint | null;
120
+ firstName?: string | null;
121
+ lastName?: string | null;
122
+ email?: string | null;
123
+ accountOwner?: boolean;
124
+ locale?: string | null;
125
+ collaborator?: boolean | null;
126
+ emailVerified?: boolean | null;
127
+ refreshToken?: string | null;
128
+ refreshTokenExpires?: Date | null;
129
+ }>;
130
+ type ShopifyOfflineSessionCreateData = ShopifyOfflineSessionData & Readonly<{
131
+ id: string;
132
+ shop: string;
133
+ state: string;
134
+ accessToken: string;
135
+ }>;
136
+ type ShopifyOfflineSessionDelegate = Readonly<{
137
+ findUnique(args: Readonly<{
138
+ where: ShopifyOfflineSessionUniqueWhere;
139
+ select?: ShopifyOfflineSessionSelect;
140
+ }>): Promise<ShopifyOfflineSessionRecord | null>;
141
+ findMany(args: Readonly<{
142
+ where: ShopifyOfflineSessionWhere;
143
+ select?: ShopifyOfflineSessionSelect;
144
+ take?: number;
145
+ }>): Promise<ShopifyOfflineSessionRecord[]>;
146
+ create(args: Readonly<{
147
+ data: ShopifyOfflineSessionCreateData;
148
+ select?: ShopifyOfflineSessionSelect;
149
+ }>): Promise<ShopifyOfflineSessionRecord>;
150
+ update(args: Readonly<{
151
+ where: ShopifyOfflineSessionUniqueWhere;
152
+ data: ShopifyOfflineSessionData;
153
+ select?: ShopifyOfflineSessionSelect;
154
+ }>): Promise<ShopifyOfflineSessionRecord>;
155
+ upsert(args: Readonly<{
156
+ where: ShopifyOfflineSessionUniqueWhere;
157
+ create: ShopifyOfflineSessionCreateData;
158
+ update: ShopifyOfflineSessionData;
159
+ select?: ShopifyOfflineSessionSelect;
160
+ }>): Promise<ShopifyOfflineSessionRecord>;
161
+ delete(args: Readonly<{
162
+ where: ShopifyOfflineSessionUniqueWhere;
163
+ select?: ShopifyOfflineSessionSelect;
164
+ }>): Promise<ShopifyOfflineSessionRecord>;
165
+ deleteMany(args: Readonly<{
166
+ where?: ShopifyOfflineSessionWhere;
167
+ }>): Promise<{
168
+ count: number;
169
+ }>;
170
+ updateMany(args: Readonly<{
171
+ where?: ShopifyOfflineSessionWhere;
172
+ data: ShopifyOfflineSessionData;
173
+ }>): Promise<{
174
+ count: number;
175
+ }>;
176
+ }>;
177
+ type ShopifyOfflineTransaction = Readonly<{
178
+ $queryRawUnsafe<T = unknown>(sql: string, ...values: unknown[]): Promise<T>;
179
+ $executeRawUnsafe(sql: string, ...values: unknown[]): Promise<number>;
180
+ session: ShopifyOfflineSessionDelegate;
181
+ shop: Readonly<{
182
+ findUnique(args: Readonly<{
183
+ where: Readonly<{
184
+ id: string;
185
+ }>;
186
+ select: Readonly<{
187
+ id: true;
188
+ domain: true;
189
+ platform: true;
190
+ status: true;
191
+ }>;
192
+ }>): Promise<ShopifyOfflineShopRecord | null>;
193
+ }>;
194
+ }>;
195
+ type ShopifyOfflineDatabase = Readonly<{
196
+ $transaction<T>(work: (transaction: ShopifyOfflineTransaction) => Promise<T>, options: Readonly<{
197
+ maxWait: 5000;
198
+ timeout: 20000;
199
+ isolationLevel: "ReadCommitted";
200
+ }>): Promise<T>;
201
+ shop: ShopifyOfflineTransaction["shop"];
202
+ }>;
203
+ type OfflineCredentialSnapshot = Readonly<{
204
+ id: string;
205
+ shopId: string;
206
+ shop: string;
207
+ accessToken: string;
208
+ scope: string | null;
209
+ expires: Date | null;
210
+ refreshTokenExpires: Date | null;
211
+ }>;
212
+ type LockedSessionContext = Readonly<{
213
+ transaction: ShopifyOfflineTransaction;
214
+ shopId: string;
215
+ shop: string;
216
+ sessionId: string;
217
+ signal: AbortSignal;
218
+ }>;
219
+ type SdkInstallationSessionContext = Readonly<{
220
+ transaction: ShopifyOfflineTransaction;
221
+ shopId: null;
222
+ shop: string;
223
+ sessionId: string | null;
224
+ signal: AbortSignal;
225
+ }>;
226
+ type ShopifyOfflineTokenProvider = Readonly<{
227
+ withSdkInstallationSessionLock<T>(integrationDomain: string, work: (context: SdkInstallationSessionContext) => Promise<T>): Promise<T>;
228
+ getAccessToken(shopId: string, options?: Readonly<{
229
+ signal?: AbortSignal;
230
+ }>): Promise<string>;
231
+ getSession(shopId: string, options?: Readonly<{
232
+ signal?: AbortSignal;
233
+ }>): Promise<OfflineCredentialSnapshot>;
234
+ withSessionLock<T>(shopId: string, work: (context: LockedSessionContext) => Promise<T>, options?: Readonly<{
235
+ signal?: AbortSignal;
236
+ }>): Promise<T>;
237
+ }>;
238
+ declare function createShopifyOfflineTokenProvider(input: Readonly<{
239
+ prisma: ShopifyOfflineDatabase;
240
+ readOAuth: () => Promise<Readonly<{
241
+ apiKey: string;
242
+ apiSecret: string;
243
+ }>>;
244
+ fetch: typeof fetch;
245
+ now?: () => number;
246
+ }>): ShopifyOfflineTokenProvider;
247
+
248
+ declare const CONFIGURATION_KEY: "shopify.oauth";
249
+ type ShopifyOAuthConfigurationErrorCode = "INVALID_ENVIRONMENT" | "CONFIGURATION_UNAVAILABLE" | "CONFIGURATION_INVALID";
250
+ /** Safe configuration boundary error; never contains a row, key, or decrypt cause. */
251
+ declare class ShopifyOAuthConfigurationError extends Error {
252
+ readonly code: ShopifyOAuthConfigurationErrorCode;
253
+ constructor(code: ShopifyOAuthConfigurationErrorCode);
254
+ }
255
+ type ShopifyOAuthConfigurationRow = Readonly<{
256
+ environment: string;
257
+ key: string;
258
+ version: number;
259
+ value: unknown;
260
+ }>;
261
+ type ShopifyOAuthConfigurationPrisma = Readonly<{
262
+ platformConfiguration: Readonly<{
263
+ findUnique(args: Readonly<{
264
+ where: Readonly<{
265
+ environment_key: Readonly<{
266
+ environment: string;
267
+ key: typeof CONFIGURATION_KEY;
268
+ }>;
269
+ }>;
270
+ select: Readonly<{
271
+ environment: true;
272
+ key: true;
273
+ version: true;
274
+ value: true;
275
+ }>;
276
+ }>): Promise<ShopifyOAuthConfigurationRow | null>;
277
+ }>;
278
+ }>;
279
+ type ShopifyOAuthCredentials = Readonly<{
280
+ apiKey: string;
281
+ apiSecret: string;
282
+ }>;
283
+ /**
284
+ * Read and unseal the existing platform `shopify.oauth` row. Environment identity
285
+ * is deployment configuration supplied by the caller, never request data.
286
+ */
287
+ declare function readShopifyOAuthConfiguration(input: Readonly<{
288
+ prisma: ShopifyOAuthConfigurationPrisma;
289
+ environment: string;
290
+ unsealKeyring: CredentialKeyring;
291
+ }>): Promise<ShopifyOAuthCredentials>;
292
+
4
293
  /**
5
294
  * Legacy webhook delivery job id used by earlier receipt/outbox flows.
6
295
  * Prefer the resource-scoped helpers below for current queue publication.
@@ -22,4 +311,4 @@ declare function createShopifyDiscountSyncJobId(event: {
22
311
  */
23
312
  declare function createShopifyWhatsAppConsentSyncJobId(input: ShopifyWhatsAppConsentSyncJobV1): string;
24
313
 
25
- export { createPendingRecoveryCandidateJobId, createShopifyCheckoutJobId, createShopifyDiscountSyncJobId, createShopifyOrderJobId, createShopifyWebhookJobId, createShopifyWhatsAppConsentSyncJobId };
314
+ export { type LockedSessionContext, type OfflineCredentialSnapshot, type SdkInstallationSessionContext, ShopifyOAuthConfigurationError, type ShopifyOAuthConfigurationErrorCode, type ShopifyOAuthConfigurationPrisma, type ShopifyOAuthConfigurationRow, type ShopifyOAuthCredentials, type ShopifyOfflineBigIntFilter, type ShopifyOfflineBooleanFilter, type ShopifyOfflineDatabase, type ShopifyOfflineDateFilter, type ShopifyOfflineNullableBooleanFilter, type ShopifyOfflineNullableStringFilter, type ShopifyOfflineSessionCreateData, type ShopifyOfflineSessionData, type ShopifyOfflineSessionDelegate, type ShopifyOfflineSessionRecord, type ShopifyOfflineSessionScalarWhere, type ShopifyOfflineSessionSelect, type ShopifyOfflineSessionUniqueWhere, type ShopifyOfflineSessionWhere, type ShopifyOfflineShopRecord, type ShopifyOfflineStringFilter, ShopifyOfflineTokenError, type ShopifyOfflineTokenErrorCode, type ShopifyOfflineTokenProvider, type ShopifyOfflineTransaction, createPendingRecoveryCandidateJobId, createShopifyCheckoutJobId, createShopifyDiscountSyncJobId, createShopifyOfflineTokenProvider, createShopifyOrderJobId, createShopifyWebhookJobId, createShopifyWhatsAppConsentSyncJobId, readShopifyOAuthConfiguration };