Skip to content

Commit 796b7e2

Browse files
MC-553: MC-1553: use pocket/[email protected] (#81)
* use pocket/[email protected]
1 parent c4fcdae commit 796b7e2

File tree

2 files changed

+49
-51
lines changed

2 files changed

+49
-51
lines changed

.circleci/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2.1
22

33
orbs:
4-
pocket: pocket/circleci-orbs@2.2.3
4+
pocket: pocket/circleci-orbs@2.3.0
55
backstage-entity-validator: roadiehq/[email protected]
66

77
# Workflow shortcuts
@@ -184,6 +184,7 @@ workflows:
184184
aws-access-key-id: Dev_AWS_ACCESS_KEY
185185
aws-secret-access-key: Dev_AWS_SECRET_ACCESS_KEY
186186
aws-region: Dev_AWS_DEFAULT_REGION
187+
aws-account-id: ${ACCOUNT_ID_DEV}
187188
repo-name: ${SERVICE_NAME_LOWER}-dev-app
188189
ecr-url: ${ACCOUNT_ID_DEV}.dkr.ecr.us-east-1.amazonaws.com
189190
push: false
@@ -200,6 +201,7 @@ workflows:
200201
aws-region: Dev_AWS_DEFAULT_REGION
201202
codebuild-project-name: ${SERVICE_NAME}-Dev
202203
codebuild-project-branch: dev
204+
aws-account-id: ${ACCOUNT_ID_DEV}
203205
repo-name: ${SERVICE_NAME_LOWER}-dev-app
204206
ecr-url: ${ACCOUNT_ID_DEV}.dkr.ecr.us-east-1.amazonaws.com
205207
push: true
@@ -231,6 +233,7 @@ workflows:
231233
aws-region: Prod_AWS_DEFAULT_REGION
232234
codebuild-project-name: ${SERVICE_NAME}-Prod
233235
codebuild-project-branch: main
236+
aws-account-id: ${ACCOUNT_ID_PROD}
234237
repo-name: ${SERVICE_NAME_LOWER}-prod-app
235238
ecr-url: ${ACCOUNT_ID_PROD}.dkr.ecr.us-east-1.amazonaws.com
236239
push: true

src/generated/openapi/types.ts

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,36 @@
44
*/
55

66

7+
/** Type helpers */
8+
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
9+
type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
10+
type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
11+
712
export interface paths {
813
"/desktop/v1/recommendations": {
914
/**
10-
* Gets a list of Recommendations for a Locale and Region. This operation is performed anonymously and requires no auth.
15+
* Gets a list of Recommendations for a Locale and Region. This operation is performed anonymously and requires no auth.
1116
* @description Supports Fx desktop version 114 and up.
1217
*/
1318
get: operations["getRecommendations"];
1419
};
1520
"/v3/firefox/global-recs": {
1621
/**
17-
* Used by older versions of Firefox to get a list of Recommendations for a Locale and Region. This operation is performed anonymously and requires no auth.
18-
* @deprecated
22+
* Used by older versions of Firefox to get a list of Recommendations for a Locale and Region. This operation is performed anonymously and requires no auth.
23+
* @deprecated
1924
* @description Supports Fx desktop version 115 and below.
2025
*/
2126
get: operations["getGlobalRecs"];
2227
};
2328
"/desktop/v1/recent-saves": {
2429
/**
25-
* Gets a list of the most recent saves for a specific user.
30+
* Gets a list of the most recent saves for a specific user.
2631
* @description Supports Fx desktop version 113 and up.
2732
*/
2833
get: operations["getRecentSaves"];
2934
};
3035
}
3136

32-
export type webhooks = Record<string, never>;
33-
3437
export interface components {
3538
schemas: {
3639
Error: {
@@ -52,11 +55,11 @@ export interface components {
5255
};
5356
ErrorResponse: {
5457
/** @description An array of error objects */
55-
errors: components["schemas"]["Error"][];
58+
errors: (components["schemas"]["Error"])[];
5659
};
5760
Save: {
5861
/**
59-
* @description Constant identifier for Saves, allowing them to be differentiated when multiple types are returned together.
62+
* @description Constant identifier for Saves, allowing them to be differentiated when multiple types are returned together.
6063
* @enum {string}
6164
*/
6265
__typename: "Save";
@@ -81,7 +84,7 @@ export interface components {
8184
};
8285
PendingSave: {
8386
/**
84-
* @description Constant identifier for PendingSave, allowing them to be differentiated when multiple types are returned together.
87+
* @description Constant identifier for PendingSave, allowing them to be differentiated when multiple types are returned together.
8588
* @enum {string}
8689
*/
8790
__typename: "PendingSave";
@@ -93,14 +96,14 @@ export interface components {
9396
/** @description These items contain similar content to saves, but have been through a curation process and have more guaranteed data. */
9497
Recommendation: {
9598
/**
96-
* @description Constant identifier for Recommendation type objects.
99+
* @description Constant identifier for Recommendation type objects.
97100
* @enum {string}
98101
*/
99102
__typename: "Recommendation";
100103
/** @description String identifier for the Recommendation. This value is expected to be different on each request. */
101104
recommendationId?: string;
102105
/**
103-
* @deprecated
106+
* @deprecated
104107
* @description Numerical identifier for the Recommendation. This is specifically a number for Fx client and Mozilla data pipeline compatibility. This property will continue to be present because Firefox clients depend on it, but downstream users should use the recommendation id instead when available.
105108
*/
106109
tileId: number;
@@ -130,12 +133,12 @@ export interface components {
130133
LegacySettings: {
131134
spocsPerNewTabs?: number;
132135
domainAffinityParameterSets?: Record<string, never>;
133-
timeSegments?: {
136+
timeSegments?: ({
134137
id: string;
135138
startTime: number;
136139
endTime: number;
137140
weightPosition: number;
138-
}[];
141+
})[];
139142
recsExpireTime?: number;
140143
version?: string;
141144
};
@@ -147,26 +150,24 @@ export interface components {
147150
pathItems: never;
148151
}
149152

150-
export type $defs = Record<string, never>;
151-
152153
export type external = Record<string, never>;
153154

154155
export interface operations {
155156

156-
/**
157-
* Gets a list of Recommendations for a Locale and Region. This operation is performed anonymously and requires no auth.
158-
* @description Supports Fx desktop version 114 and up.
159-
*/
160157
getRecommendations: {
158+
/**
159+
* Gets a list of Recommendations for a Locale and Region. This operation is performed anonymously and requires no auth.
160+
* @description Supports Fx desktop version 114 and up.
161+
*/
161162
parameters: {
162-
query: {
163163
/** @description The number of items to return. */
164-
count?: number;
165164
/** @description This locale string is Fx domain language, and built from Fx expectations. Parameter values are not case sensitive. */
166-
locale: "fr" | "fr-FR" | "es" | "es-ES" | "it" | "it-IT" | "en" | "en-CA" | "en-GB" | "en-US" | "de" | "de-DE" | "de-AT" | "de-CH";
167165
/** @description This region string is Fx domain language, and built from Fx expectations. Parameter values are not case sensitive. See [Firefox Home & New Tab Regional Differences](https://mozilla-hub.atlassian.net/wiki/spaces/FPS/pages/80448805/Regional+Differences). */
168-
region?: string;
169166
/** @description Returns recommendations specific to the region if set to 1. */
167+
query: {
168+
count?: number;
169+
locale: "fr" | "fr-FR" | "es" | "es-ES" | "it" | "it-IT" | "en" | "en-CA" | "en-GB" | "en-US" | "de" | "de-DE" | "de-AT" | "de-CH";
170+
region?: string;
170171
enableRankingByRegion?: 0 | 1;
171172
};
172173
};
@@ -175,7 +176,7 @@ export interface operations {
175176
200: {
176177
content: {
177178
"application/json": {
178-
data: components["schemas"]["Recommendation"][];
179+
data: (components["schemas"]["Recommendation"])[];
179180
};
180181
};
181182
};
@@ -186,9 +187,7 @@ export interface operations {
186187
};
187188
};
188189
/** @description This proxy service encountered an unexpected error. */
189-
500: {
190-
content: never;
191-
};
190+
500: never;
192191
/** @description Services downstream from this proxy encountered an unexpected error. */
193192
502: {
194193
content: {
@@ -203,21 +202,21 @@ export interface operations {
203202
};
204203
};
205204
};
206-
/**
207-
* Used by older versions of Firefox to get a list of Recommendations for a Locale and Region. This operation is performed anonymously and requires no auth.
208-
* @deprecated
209-
* @description Supports Fx desktop version 115 and below.
210-
*/
211205
getGlobalRecs: {
206+
/**
207+
* Used by older versions of Firefox to get a list of Recommendations for a Locale and Region. This operation is performed anonymously and requires no auth.
208+
* @deprecated
209+
* @description Supports Fx desktop version 115 and below.
210+
*/
212211
parameters: {
213-
query: {
214212
/** @description API version */
215-
version: number;
216213
/** @description Firefox locale */
217-
locale_lang: string;
218214
/** @description Firefox region */
219-
region?: string;
220215
/** @description Maximum number of items to return */
216+
query: {
217+
version: number;
218+
locale_lang: string;
219+
region?: string;
221220
count?: number;
222221
};
223222
};
@@ -228,9 +227,9 @@ export interface operations {
228227
"application/json": {
229228
/** @enum {integer} */
230229
status: 1;
231-
spocs: unknown[];
230+
spocs: (unknown)[];
232231
settings: components["schemas"]["LegacySettings"];
233-
recommendations: components["schemas"]["LegacyFeedItem"][];
232+
recommendations: (components["schemas"]["LegacyFeedItem"])[];
234233
};
235234
};
236235
};
@@ -241,9 +240,7 @@ export interface operations {
241240
};
242241
};
243242
/** @description This proxy service encountered an unexpected error. */
244-
500: {
245-
content: never;
246-
};
243+
500: never;
247244
/** @description Services downstream from this proxy encountered an unexpected error. */
248245
502: {
249246
content: {
@@ -258,14 +255,14 @@ export interface operations {
258255
};
259256
};
260257
};
261-
/**
262-
* Gets a list of the most recent saves for a specific user.
263-
* @description Supports Fx desktop version 113 and up.
264-
*/
265258
getRecentSaves: {
266-
parameters: {
267-
query?: {
259+
/**
260+
* Gets a list of the most recent saves for a specific user.
261+
* @description Supports Fx desktop version 113 and up.
262+
*/
263+
parameters?: {
268264
/** @description The number of items to return. */
265+
query?: {
269266
count?: number;
270267
};
271268
};
@@ -291,9 +288,7 @@ export interface operations {
291288
};
292289
};
293290
/** @description This proxy service encountered an unexpected error. */
294-
500: {
295-
content: never;
296-
};
291+
500: never;
297292
/** @description Services downstream from this proxy encountered an unexpected error. */
298293
502: {
299294
content: {

0 commit comments

Comments
 (0)