@maxim_mazurok/gapi.client.merchantapi-issueresolution_v1beta 0.0.20250505
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.
- package/index.d.ts +462 -0
- package/package.json +20 -0
- package/readme.md +90 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Merchant API issueresolution_v1beta 0.0 */
|
|
2
|
+
// Project: https://developers.devsite.corp.google.com/merchant/api
|
|
3
|
+
// Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
|
|
4
|
+
// Nick Amoscato <https://github.com/namoscato>
|
|
5
|
+
// Declan Vong <https://github.com/declanvong>
|
|
6
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
|
+
|
|
8
|
+
// IMPORTANT
|
|
9
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
|
+
// Generated from: https://merchantapi.googleapis.com/$discovery/rest?version=issueresolution_v1beta
|
|
12
|
+
// Revision: 20250505
|
|
13
|
+
|
|
14
|
+
/// <reference types="gapi.client" />
|
|
15
|
+
|
|
16
|
+
declare namespace gapi.client {
|
|
17
|
+
/** Load Merchant API issueresolution_v1beta */
|
|
18
|
+
function load(
|
|
19
|
+
urlOrObject: 'https://merchantapi.googleapis.com/$discovery/rest?version=issueresolution_v1beta',
|
|
20
|
+
): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(
|
|
23
|
+
name: 'merchantapi',
|
|
24
|
+
version: 'issueresolution_v1beta',
|
|
25
|
+
): Promise<void>;
|
|
26
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
27
|
+
function load(
|
|
28
|
+
name: 'merchantapi',
|
|
29
|
+
version: 'issueresolution_v1beta',
|
|
30
|
+
callback: () => any,
|
|
31
|
+
): void;
|
|
32
|
+
|
|
33
|
+
namespace merchantapi {
|
|
34
|
+
interface Action {
|
|
35
|
+
/** Action implemented and performed in (your) third-party application. The application should point the business to the place, where they can access the corresponding functionality or provide instructions, if the specific functionality is not available. */
|
|
36
|
+
builtinSimpleAction?: BuiltInSimpleAction;
|
|
37
|
+
/** Action implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the business as specified for given action. They can trigger the action only when they provided all required inputs. */
|
|
38
|
+
builtinUserInputAction?: BuiltInUserInputAction;
|
|
39
|
+
/** Label of the action button. */
|
|
40
|
+
buttonLabel?: string;
|
|
41
|
+
/** Action that is implemented and performed outside of (your) third-party application. The application needs to redirect the business to the external location where they can perform the action. */
|
|
42
|
+
externalAction?: ExternalAction;
|
|
43
|
+
/** Controlling whether the button is active or disabled. The value is 'false' when the action was already requested or is not available. If the action is not available then a reason will be present. If (your) third-party application shows a disabled button for action that is not available, then it should also show reasons. */
|
|
44
|
+
isAvailable?: boolean;
|
|
45
|
+
/** List of reasons why the action is not available. The list of reasons is empty if the action is available. If there is only one reason, it can be displayed next to the disabled button. If there are more reasons, all of them should be displayed, for example in a pop-up dialog. */
|
|
46
|
+
reasons?: Reason[];
|
|
47
|
+
}
|
|
48
|
+
interface ActionFlow {
|
|
49
|
+
/** Label for the button to trigger the action from the action dialog. For example: "Request review" */
|
|
50
|
+
dialogButtonLabel?: string;
|
|
51
|
+
/** Important message to be highlighted in the request dialog. For example: "You can only request a review for disagreeing with this issue once. If it's not approved, you'll need to fix the issue and wait a few days before you can request another review." */
|
|
52
|
+
dialogCallout?: Callout;
|
|
53
|
+
/** Message displayed in the request dialog. For example: "Make sure you've fixed all your country-specific issues. If not, you may have to wait 7 days to request another review". There may be an more information to be shown in a tooltip. */
|
|
54
|
+
dialogMessage?: TextWithTooltip;
|
|
55
|
+
/** Title of the request dialog. For example: "Before you request a review" */
|
|
56
|
+
dialogTitle?: string;
|
|
57
|
+
/** Not for display but need to be sent back for the selected action flow. */
|
|
58
|
+
id?: string;
|
|
59
|
+
/** A list of input fields. */
|
|
60
|
+
inputs?: InputField[];
|
|
61
|
+
/** Text value describing the intent for the action flow. It can be used as an input label if business needs to pick one of multiple flows. For example: "I disagree with the issue" */
|
|
62
|
+
label?: string;
|
|
63
|
+
}
|
|
64
|
+
interface ActionInput {
|
|
65
|
+
/** Required. Id of the selected action flow. */
|
|
66
|
+
actionFlowId?: string;
|
|
67
|
+
/** Required. Values for input fields. */
|
|
68
|
+
inputValues?: InputValue[];
|
|
69
|
+
}
|
|
70
|
+
interface AdditionalContent {
|
|
71
|
+
/** Long text organized into paragraphs. */
|
|
72
|
+
paragraphs?: string[];
|
|
73
|
+
/** Title of the additional content; */
|
|
74
|
+
title?: string;
|
|
75
|
+
}
|
|
76
|
+
interface Breakdown {
|
|
77
|
+
/** Human readable, localized description of issue's effect on different targets. Should be rendered as a list. For example: * "Products not showing in ads" * "Products not showing organically" */
|
|
78
|
+
details?: string[];
|
|
79
|
+
/** Lists of regions. Should be rendered as a title for this group of details. The full list should be shown to the business. If the list is too long, it is recommended to make it expandable. */
|
|
80
|
+
regions?: Region[];
|
|
81
|
+
}
|
|
82
|
+
interface BuiltInSimpleAction {
|
|
83
|
+
/** Long text from an external source that should be available to the business. Present when the type is `SHOW_ADDITIONAL_CONTENT`. */
|
|
84
|
+
additionalContent?: AdditionalContent;
|
|
85
|
+
/** The attribute that needs to be updated. Present when the type is `EDIT_ITEM_ATTRIBUTE`. This field contains a code for attribute, represented in snake_case. You can find a list of product's attributes, with their codes [here](https://support.google.com/merchants/answer/7052112). */
|
|
86
|
+
attributeCode?: string;
|
|
87
|
+
/** The type of action that represents a functionality that is expected to be available in third-party application. */
|
|
88
|
+
type?: string;
|
|
89
|
+
}
|
|
90
|
+
interface BuiltInUserInputAction {
|
|
91
|
+
/** Contains the action's context that must be included as part of the TriggerActionPayload.action_context in TriggerActionRequest.payload to call the `triggeraction` method. The content should be treated as opaque and must not be modified. */
|
|
92
|
+
actionContext?: string;
|
|
93
|
+
/** Actions may provide multiple different flows. Business selects one that fits best to their intent. Selecting the flow is the first step in user's interaction with the action. It affects what input fields will be available and required and also how the request will be processed. */
|
|
94
|
+
flows?: ActionFlow[];
|
|
95
|
+
}
|
|
96
|
+
interface Callout {
|
|
97
|
+
/** A full message that needs to be shown to the business. */
|
|
98
|
+
fullMessage?: TextWithTooltip;
|
|
99
|
+
/** Can be used to render messages with different severity in different styles. Snippets off all types contain important information that should be displayed to the business. */
|
|
100
|
+
styleHint?: string;
|
|
101
|
+
}
|
|
102
|
+
interface CheckboxInput {}
|
|
103
|
+
interface CheckboxInputValue {
|
|
104
|
+
/** Required. True if the business checked the box field. False otherwise. */
|
|
105
|
+
value?: boolean;
|
|
106
|
+
}
|
|
107
|
+
interface ChoiceInput {
|
|
108
|
+
/** A list of choices. Only one option can be selected. */
|
|
109
|
+
options?: ChoiceInputOption[];
|
|
110
|
+
}
|
|
111
|
+
interface ChoiceInputOption {
|
|
112
|
+
/** Input that should be displayed when this option is selected. The additional input will not contain a `ChoiceInput`. */
|
|
113
|
+
additionalInput?: InputField;
|
|
114
|
+
/** Not for display but need to be sent back for the selected choice option. */
|
|
115
|
+
id?: string;
|
|
116
|
+
/** Short description of the choice option. There may be more information to be shown as a tooltip. */
|
|
117
|
+
label?: TextWithTooltip;
|
|
118
|
+
}
|
|
119
|
+
interface ChoiceInputValue {
|
|
120
|
+
/** Required. Id of the option that was selected by the business. */
|
|
121
|
+
choiceInputOptionId?: string;
|
|
122
|
+
}
|
|
123
|
+
interface ExternalAction {
|
|
124
|
+
/** The type of external action. */
|
|
125
|
+
type?: string;
|
|
126
|
+
/** URL to external system, for example Merchant Center, where the business can perform the action. */
|
|
127
|
+
uri?: string;
|
|
128
|
+
}
|
|
129
|
+
interface Impact {
|
|
130
|
+
/** Detailed impact breakdown. Explains the types of restriction the issue has in different shopping destinations and territory. If present, it should be rendered to the business. Can be shown as a mouse over dropdown or a dialog. Each breakdown item represents a group of regions with the same impact details. */
|
|
131
|
+
breakdowns?: Breakdown[];
|
|
132
|
+
/** Optional. Message summarizing the overall impact of the issue. If present, it should be rendered to the business. For example: "Disapproves 90k offers in 25 countries" */
|
|
133
|
+
message?: string;
|
|
134
|
+
/** The severity of the issue. */
|
|
135
|
+
severity?: string;
|
|
136
|
+
}
|
|
137
|
+
interface InputField {
|
|
138
|
+
/** Input field to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). */
|
|
139
|
+
checkboxInput?: any;
|
|
140
|
+
/** Input field to select one of the offered choices. Corresponds to the [html input type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). */
|
|
141
|
+
choiceInput?: ChoiceInput;
|
|
142
|
+
/** Not for display but need to be sent back for the given input field. */
|
|
143
|
+
id?: string;
|
|
144
|
+
/** Input field label. There may be more information to be shown in a tooltip. */
|
|
145
|
+
label?: TextWithTooltip;
|
|
146
|
+
/** Whether the field is required. The action button needs to stay disabled till values for all required fields are provided. */
|
|
147
|
+
required?: boolean;
|
|
148
|
+
/** Input field to provide text information. Corresponds to the [html input type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) or [html textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). */
|
|
149
|
+
textInput?: TextInput;
|
|
150
|
+
}
|
|
151
|
+
interface InputValue {
|
|
152
|
+
/** Value for checkbox input field. */
|
|
153
|
+
checkboxInputValue?: CheckboxInputValue;
|
|
154
|
+
/** Value for choice input field. */
|
|
155
|
+
choiceInputValue?: ChoiceInputValue;
|
|
156
|
+
/** Required. Id of the corresponding input field. */
|
|
157
|
+
inputFieldId?: string;
|
|
158
|
+
/** Value for text input field. */
|
|
159
|
+
textInputValue?: TextInputValue;
|
|
160
|
+
}
|
|
161
|
+
interface ProductChange {
|
|
162
|
+
/** The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) */
|
|
163
|
+
newValue?: string;
|
|
164
|
+
/** The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) */
|
|
165
|
+
oldValue?: string;
|
|
166
|
+
/** Countries that have the change (if applicable). Represented in the ISO 3166 format. */
|
|
167
|
+
regionCode?: string;
|
|
168
|
+
/** Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum) */
|
|
169
|
+
reportingContext?: string;
|
|
170
|
+
}
|
|
171
|
+
interface ProductStatusChangeMessage {
|
|
172
|
+
/** The target account that owns the entity that changed. Format : `accounts/{merchant_id}` */
|
|
173
|
+
account?: string;
|
|
174
|
+
/** The attribute in the resource that changed, in this case it will be always `Status`. */
|
|
175
|
+
attribute?: string;
|
|
176
|
+
/** A message to describe the change that happened to the product */
|
|
177
|
+
changes?: ProductChange[];
|
|
178
|
+
/** The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications. */
|
|
179
|
+
eventTime?: string;
|
|
180
|
+
/** Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event. */
|
|
181
|
+
expirationTime?: string;
|
|
182
|
+
/** The account that manages the merchant's account. can be the same as merchant id if it is standalone account. Format : `accounts/{service_provider_id}` */
|
|
183
|
+
managingAccount?: string;
|
|
184
|
+
/** The product name. Format: `accounts/{account}/products/{product}` */
|
|
185
|
+
resource?: string;
|
|
186
|
+
/** The product id. */
|
|
187
|
+
resourceId?: string;
|
|
188
|
+
/** The resource that changed, in this case it will always be `Product`. */
|
|
189
|
+
resourceType?: string;
|
|
190
|
+
}
|
|
191
|
+
interface Reason {
|
|
192
|
+
/** Optional. An action that needs to be performed to solve the problem represented by this reason. This action will always be available. Should be rendered as a link or button next to the summarizing message. For example, the review may be available only once the business configure all required attributes. In such a situation this action can be a link to the form, where they can fill the missing attribute to unblock the main action. */
|
|
193
|
+
action?: Action;
|
|
194
|
+
/** Detailed explanation of the reason. Should be displayed as a hint if present. */
|
|
195
|
+
detail?: string;
|
|
196
|
+
/** Messages summarizing the reason, why the action is not available. For example: "Review requested on Jan 03. Review requests can take a few days to complete." */
|
|
197
|
+
message?: string;
|
|
198
|
+
}
|
|
199
|
+
interface Region {
|
|
200
|
+
/** The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) */
|
|
201
|
+
code?: string;
|
|
202
|
+
/** The localized name of the region. For region with code='001' the value is 'All countries' or the equivalent in other languages. */
|
|
203
|
+
name?: string;
|
|
204
|
+
}
|
|
205
|
+
interface RenderAccountIssuesResponse {
|
|
206
|
+
/** List of account issues for a given account. This list can be shown with compressed, expandable items. In the compressed form, the title and impact should be shown for each issue. Once the issue is expanded, the detailed content and available actions should be rendered. */
|
|
207
|
+
renderedIssues?: RenderedIssue[];
|
|
208
|
+
}
|
|
209
|
+
interface RenderedIssue {
|
|
210
|
+
/** A list of actionable steps that can be executed to solve the issue. An example is requesting a re-review or providing arguments when business disagrees with the issue. Actions that are supported in (your) third-party application can be rendered as buttons and should be available to the business when they expand the issue. */
|
|
211
|
+
actions?: Action[];
|
|
212
|
+
/** Clarifies the severity of the issue. The summarizing message, if present, should be shown right under the title for each issue. It helps business to quickly understand the impact of the issue. The detailed breakdown helps the business to fully understand the impact of the issue. It can be rendered as dialog that opens when the business mouse over the summarized impact statement. Issues with different severity can be styled differently. They may use a different color or icon to signal the difference between `ERROR`, `WARNING` and `INFO`. */
|
|
213
|
+
impact?: Impact;
|
|
214
|
+
/** Details of the issue as a pre-rendered HTML. HTML elements contain CSS classes that can be used to customize the style of the content. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `issue-detail` - top level container for the detail of the issue * `callout-banners` - section of the `issue-detail` with callout banners * `callout-banner` - single callout banner, inside `callout-banners` * `callout-banner-info` - callout with important information (default) * `callout-banner-warning` - callout with a warning * `callout-banner-error` - callout informing about an error (most severe) * `issue-content` - section of the `issue-detail`, contains multiple `content-element` * `content-element` - content element such as a list, link or paragraph, inside `issue-content` * `root-causes` - unordered list with items describing root causes of the issue, inside `issue-content` * `root-causes-intro` - intro text before the `root-causes` list, inside `issue-content` * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. * `content-moderation` - marks the paragraph that explains how the issue was identified. * `new-element` - Present for new elements added to the pre-rendered content in the future. To make sure that a new content element does not break your style, you can hide everything with this class. */
|
|
215
|
+
prerenderedContent?: string;
|
|
216
|
+
/** Pre-rendered HTML that contains a link to the external location where the ODS can be requested and instructions for how to request it. HTML elements contain CSS classes that can be used to customize the style of this snippet. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `ods-section`* - wrapper around the out-of-court dispute resolution section * `ods-description`* - intro text for the out-of-court dispute resolution. It may contain multiple segments and a link. * `ods-param`* - wrapper around the header-value pair for parameters that the business may need to provide during the ODS process. * `ods-routing-id`* - ods param for the Routing ID. * `ods-reference-id`* - ods param for the Routing ID. * `ods-param-header`* - header for the ODS parameter * `ods-param-value`* - value of the ODS parameter. This value should be rendered in a way that it is easy for the user to identify and copy. * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. */
|
|
217
|
+
prerenderedOutOfCourtDisputeSettlement?: string;
|
|
218
|
+
/** Title of the issue. */
|
|
219
|
+
title?: string;
|
|
220
|
+
}
|
|
221
|
+
interface RenderIssuesRequestPayload {
|
|
222
|
+
/** Optional. How the detailed content should be returned. Default option is to return the content as a pre-rendered HTML text. */
|
|
223
|
+
contentOption?: string;
|
|
224
|
+
/** Optional. How actions with user input form should be handled. If not provided, actions will be returned as links that points the business to Merchant Center where they can request the action. */
|
|
225
|
+
userInputActionOption?: string;
|
|
226
|
+
}
|
|
227
|
+
interface RenderProductIssuesResponse {
|
|
228
|
+
/** List of issues for a given product. This list can be shown with compressed, expandable items. In the compressed form, the title and impact should be shown for each issue. Once the issue is expanded, the detailed content and available actions should be rendered. */
|
|
229
|
+
renderedIssues?: RenderedIssue[];
|
|
230
|
+
}
|
|
231
|
+
interface TextInput {
|
|
232
|
+
/** Additional info regarding the field to be displayed to the business. For example, warning to not include personal identifiable information. There may be more information to be shown in a tooltip. */
|
|
233
|
+
additionalInfo?: TextWithTooltip;
|
|
234
|
+
/** Text to be used as the [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the input. */
|
|
235
|
+
ariaLabel?: string;
|
|
236
|
+
/** Information about the required format. If present, it should be shown close to the input field to help the business to provide a correct value. For example: "VAT numbers should be in a format similar to SK9999999999" */
|
|
237
|
+
formatInfo?: string;
|
|
238
|
+
/** Type of the text input */
|
|
239
|
+
type?: string;
|
|
240
|
+
}
|
|
241
|
+
interface TextInputValue {
|
|
242
|
+
/** Required. Text provided by the business. */
|
|
243
|
+
value?: string;
|
|
244
|
+
}
|
|
245
|
+
interface TextWithTooltip {
|
|
246
|
+
/** Value of the tooltip as a simple text. */
|
|
247
|
+
simpleTooltipValue?: string;
|
|
248
|
+
/** Value of the message as a simple text. */
|
|
249
|
+
simpleValue?: string;
|
|
250
|
+
/** The suggested type of an icon for tooltip, if a tooltip is present. */
|
|
251
|
+
tooltipIconStyle?: string;
|
|
252
|
+
}
|
|
253
|
+
interface TriggerActionPayload {
|
|
254
|
+
/** Required. The context from the selected action. The value is obtained from rendered issues and needs to be sent back to identify the action that is being triggered. */
|
|
255
|
+
actionContext?: string;
|
|
256
|
+
/** Required. Input provided by the business. */
|
|
257
|
+
actionInput?: ActionInput;
|
|
258
|
+
}
|
|
259
|
+
interface TriggerActionResponse {
|
|
260
|
+
/** The message for the business. */
|
|
261
|
+
message?: string;
|
|
262
|
+
}
|
|
263
|
+
interface IssueresolutionResource {
|
|
264
|
+
/** Provide a list of business's account issues with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications. */
|
|
265
|
+
renderaccountissues(request: {
|
|
266
|
+
/** V1 error format. */
|
|
267
|
+
'$.xgafv'?: string;
|
|
268
|
+
/** OAuth access token. */
|
|
269
|
+
access_token?: string;
|
|
270
|
+
/** Data format for response. */
|
|
271
|
+
alt?: string;
|
|
272
|
+
/** JSONP */
|
|
273
|
+
callback?: string;
|
|
274
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
275
|
+
fields?: string;
|
|
276
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
277
|
+
key?: string;
|
|
278
|
+
/** Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize issue resolution content. If not set, the result will be in default language `en-US`. */
|
|
279
|
+
languageCode?: string;
|
|
280
|
+
/** Required. The account to fetch issues for. Format: `accounts/{account}` */
|
|
281
|
+
name: string;
|
|
282
|
+
/** OAuth 2.0 token for the current user. */
|
|
283
|
+
oauth_token?: string;
|
|
284
|
+
/** Returns response with indentations and line breaks. */
|
|
285
|
+
prettyPrint?: boolean;
|
|
286
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
287
|
+
quotaUser?: string;
|
|
288
|
+
/** Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in an issue resolution content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC. */
|
|
289
|
+
timeZone?: string;
|
|
290
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
291
|
+
upload_protocol?: string;
|
|
292
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
293
|
+
uploadType?: string;
|
|
294
|
+
/** Request body */
|
|
295
|
+
resource: RenderIssuesRequestPayload;
|
|
296
|
+
}): Request<RenderAccountIssuesResponse>;
|
|
297
|
+
renderaccountissues(
|
|
298
|
+
request: {
|
|
299
|
+
/** V1 error format. */
|
|
300
|
+
'$.xgafv'?: string;
|
|
301
|
+
/** OAuth access token. */
|
|
302
|
+
access_token?: string;
|
|
303
|
+
/** Data format for response. */
|
|
304
|
+
alt?: string;
|
|
305
|
+
/** JSONP */
|
|
306
|
+
callback?: string;
|
|
307
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
308
|
+
fields?: string;
|
|
309
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
310
|
+
key?: string;
|
|
311
|
+
/** Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize issue resolution content. If not set, the result will be in default language `en-US`. */
|
|
312
|
+
languageCode?: string;
|
|
313
|
+
/** Required. The account to fetch issues for. Format: `accounts/{account}` */
|
|
314
|
+
name: string;
|
|
315
|
+
/** OAuth 2.0 token for the current user. */
|
|
316
|
+
oauth_token?: string;
|
|
317
|
+
/** Returns response with indentations and line breaks. */
|
|
318
|
+
prettyPrint?: boolean;
|
|
319
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
320
|
+
quotaUser?: string;
|
|
321
|
+
/** Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in an issue resolution content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC. */
|
|
322
|
+
timeZone?: string;
|
|
323
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
324
|
+
upload_protocol?: string;
|
|
325
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
326
|
+
uploadType?: string;
|
|
327
|
+
},
|
|
328
|
+
body: RenderIssuesRequestPayload,
|
|
329
|
+
): Request<RenderAccountIssuesResponse>;
|
|
330
|
+
/** Provide a list of issues for business's product with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications. */
|
|
331
|
+
renderproductissues(request: {
|
|
332
|
+
/** V1 error format. */
|
|
333
|
+
'$.xgafv'?: string;
|
|
334
|
+
/** OAuth access token. */
|
|
335
|
+
access_token?: string;
|
|
336
|
+
/** Data format for response. */
|
|
337
|
+
alt?: string;
|
|
338
|
+
/** JSONP */
|
|
339
|
+
callback?: string;
|
|
340
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
341
|
+
fields?: string;
|
|
342
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
343
|
+
key?: string;
|
|
344
|
+
/** Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize an issue resolution content. If not set, the result will be in default language `en-US`. */
|
|
345
|
+
languageCode?: string;
|
|
346
|
+
/** Required. The name of the product to fetch issues for. Format: `accounts/{account}/products/{product}` */
|
|
347
|
+
name: string;
|
|
348
|
+
/** OAuth 2.0 token for the current user. */
|
|
349
|
+
oauth_token?: string;
|
|
350
|
+
/** Returns response with indentations and line breaks. */
|
|
351
|
+
prettyPrint?: boolean;
|
|
352
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
353
|
+
quotaUser?: string;
|
|
354
|
+
/** Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in an issue resolution content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC. */
|
|
355
|
+
timeZone?: string;
|
|
356
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
357
|
+
upload_protocol?: string;
|
|
358
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
359
|
+
uploadType?: string;
|
|
360
|
+
/** Request body */
|
|
361
|
+
resource: RenderIssuesRequestPayload;
|
|
362
|
+
}): Request<RenderProductIssuesResponse>;
|
|
363
|
+
renderproductissues(
|
|
364
|
+
request: {
|
|
365
|
+
/** V1 error format. */
|
|
366
|
+
'$.xgafv'?: string;
|
|
367
|
+
/** OAuth access token. */
|
|
368
|
+
access_token?: string;
|
|
369
|
+
/** Data format for response. */
|
|
370
|
+
alt?: string;
|
|
371
|
+
/** JSONP */
|
|
372
|
+
callback?: string;
|
|
373
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
374
|
+
fields?: string;
|
|
375
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
376
|
+
key?: string;
|
|
377
|
+
/** Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize an issue resolution content. If not set, the result will be in default language `en-US`. */
|
|
378
|
+
languageCode?: string;
|
|
379
|
+
/** Required. The name of the product to fetch issues for. Format: `accounts/{account}/products/{product}` */
|
|
380
|
+
name: string;
|
|
381
|
+
/** OAuth 2.0 token for the current user. */
|
|
382
|
+
oauth_token?: string;
|
|
383
|
+
/** Returns response with indentations and line breaks. */
|
|
384
|
+
prettyPrint?: boolean;
|
|
385
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
386
|
+
quotaUser?: string;
|
|
387
|
+
/** Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in an issue resolution content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC. */
|
|
388
|
+
timeZone?: string;
|
|
389
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
390
|
+
upload_protocol?: string;
|
|
391
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
392
|
+
uploadType?: string;
|
|
393
|
+
},
|
|
394
|
+
body: RenderIssuesRequestPayload,
|
|
395
|
+
): Request<RenderProductIssuesResponse>;
|
|
396
|
+
/** Start an action. The action can be requested by a business in third-party application. Before the business can request the action, the third-party application needs to show them action specific content and display a user input form. The action can be successfully started only once all `required` inputs are provided. If any `required` input is missing, or invalid value was provided, the service will return 400 error. Validation errors will contain Ids for all problematic field together with translated, human readable error messages that can be shown to the user. */
|
|
397
|
+
triggeraction(request: {
|
|
398
|
+
/** V1 error format. */
|
|
399
|
+
'$.xgafv'?: string;
|
|
400
|
+
/** OAuth access token. */
|
|
401
|
+
access_token?: string;
|
|
402
|
+
/** Data format for response. */
|
|
403
|
+
alt?: string;
|
|
404
|
+
/** JSONP */
|
|
405
|
+
callback?: string;
|
|
406
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
407
|
+
fields?: string;
|
|
408
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
409
|
+
key?: string;
|
|
410
|
+
/** Optional. Language code [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) used to localize the response. If not set, the result will be in default language `en-US`. */
|
|
411
|
+
languageCode?: string;
|
|
412
|
+
/** Required. The business's account that is triggering the action. Format: `accounts/{account}` */
|
|
413
|
+
name: string;
|
|
414
|
+
/** OAuth 2.0 token for the current user. */
|
|
415
|
+
oauth_token?: string;
|
|
416
|
+
/** Returns response with indentations and line breaks. */
|
|
417
|
+
prettyPrint?: boolean;
|
|
418
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
419
|
+
quotaUser?: string;
|
|
420
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
421
|
+
upload_protocol?: string;
|
|
422
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
423
|
+
uploadType?: string;
|
|
424
|
+
/** Request body */
|
|
425
|
+
resource: TriggerActionPayload;
|
|
426
|
+
}): Request<TriggerActionResponse>;
|
|
427
|
+
triggeraction(
|
|
428
|
+
request: {
|
|
429
|
+
/** V1 error format. */
|
|
430
|
+
'$.xgafv'?: string;
|
|
431
|
+
/** OAuth access token. */
|
|
432
|
+
access_token?: string;
|
|
433
|
+
/** Data format for response. */
|
|
434
|
+
alt?: string;
|
|
435
|
+
/** JSONP */
|
|
436
|
+
callback?: string;
|
|
437
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
438
|
+
fields?: string;
|
|
439
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
440
|
+
key?: string;
|
|
441
|
+
/** Optional. Language code [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) used to localize the response. If not set, the result will be in default language `en-US`. */
|
|
442
|
+
languageCode?: string;
|
|
443
|
+
/** Required. The business's account that is triggering the action. Format: `accounts/{account}` */
|
|
444
|
+
name: string;
|
|
445
|
+
/** OAuth 2.0 token for the current user. */
|
|
446
|
+
oauth_token?: string;
|
|
447
|
+
/** Returns response with indentations and line breaks. */
|
|
448
|
+
prettyPrint?: boolean;
|
|
449
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
450
|
+
quotaUser?: string;
|
|
451
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
452
|
+
upload_protocol?: string;
|
|
453
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
454
|
+
uploadType?: string;
|
|
455
|
+
},
|
|
456
|
+
body: TriggerActionPayload,
|
|
457
|
+
): Request<TriggerActionResponse>;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
const issueresolution: IssueresolutionResource;
|
|
461
|
+
}
|
|
462
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.merchantapi-issueresolution_v1beta",
|
|
3
|
+
"version": "0.0.20250505",
|
|
4
|
+
"description": "TypeScript typings for Merchant API issueresolution_v1beta",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "Maxim Mazurok",
|
|
12
|
+
"email": "maxim@mazurok.com",
|
|
13
|
+
"url": "https://maxim.mazurok.com"
|
|
14
|
+
},
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/gapi.client": "*",
|
|
18
|
+
"@types/gapi.client.discovery-v1": "*"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# TypeScript typings for Merchant API issueresolution_v1beta
|
|
2
|
+
|
|
3
|
+
Programmatically manage your Merchant Center Accounts.
|
|
4
|
+
For detailed description please check [documentation](https://developers.devsite.corp.google.com/merchant/api).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Merchant API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.merchantapi-issueresolution_v1beta --save-dev
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
You need to initialize Google API client in your code:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
gapi.load('client', () => {
|
|
20
|
+
// now we can use gapi.client
|
|
21
|
+
// ...
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then load api client wrapper:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
gapi.client.load(
|
|
29
|
+
'https://merchantapi.googleapis.com/$discovery/rest?version=issueresolution_v1beta',
|
|
30
|
+
() => {
|
|
31
|
+
// now we can use:
|
|
32
|
+
// gapi.client.merchantapi
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
|
|
39
|
+
gapi.client.load('merchantapi', 'issueresolution_v1beta', () => {
|
|
40
|
+
// now we can use:
|
|
41
|
+
// gapi.client.merchantapi
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Don't forget to authenticate your client before sending any request to resources:
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
// declare client_id registered in Google Developers Console
|
|
49
|
+
var client_id = '',
|
|
50
|
+
scope = [
|
|
51
|
+
// Manage your product listings and accounts for Google Shopping
|
|
52
|
+
'https://www.googleapis.com/auth/content',
|
|
53
|
+
],
|
|
54
|
+
immediate = true;
|
|
55
|
+
// ...
|
|
56
|
+
|
|
57
|
+
gapi.auth.authorize(
|
|
58
|
+
{client_id: client_id, scope: scope, immediate: immediate},
|
|
59
|
+
authResult => {
|
|
60
|
+
if (authResult && !authResult.error) {
|
|
61
|
+
/* handle successful authorization */
|
|
62
|
+
} else {
|
|
63
|
+
/* handle authorization error */
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
After that you can use Merchant API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
/*
|
|
73
|
+
Provide a list of business's account issues with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
|
|
74
|
+
*/
|
|
75
|
+
await gapi.client.merchantapi.issueresolution.renderaccountissues({
|
|
76
|
+
name: 'name',
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
Provide a list of issues for business's product with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
|
|
81
|
+
*/
|
|
82
|
+
await gapi.client.merchantapi.issueresolution.renderproductissues({
|
|
83
|
+
name: 'name',
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
Start an action. The action can be requested by a business in third-party application. Before the business can request the action, the third-party application needs to show them action specific content and display a user input form. The action can be successfully started only once all `required` inputs are provided. If any `required` input is missing, or invalid value was provided, the service will return 400 error. Validation errors will contain Ids for all problematic field together with translated, human readable error messages that can be shown to the user.
|
|
88
|
+
*/
|
|
89
|
+
await gapi.client.merchantapi.issueresolution.triggeraction({name: 'name'});
|
|
90
|
+
```
|