saha-equation-admin-portal-client 1.0.0 → 2.0.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.
@@ -8,9 +8,11 @@ const core_2 = require("@smithy/core");
8
8
  const smithy_client_1 = require("@smithy/smithy-client");
9
9
  const se_CompleteEvidenceCommand = async (input, context) => {
10
10
  const b = (0, core_2.requestBuilder)(input, context);
11
- const headers = {
11
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
12
12
  'content-type': 'application/json',
13
- };
13
+ [_xop]: input[_cP],
14
+ [_xoav]: input[_cAV],
15
+ });
14
16
  b.bp("/api/p/{service}/{stage}/moderation/evidence/complete");
15
17
  b.p('service', () => input.service, '{service}', false);
16
18
  b.p('stage', () => input.stage, '{stage}', false);
@@ -30,9 +32,11 @@ const se_CompleteEvidenceCommand = async (input, context) => {
30
32
  exports.se_CompleteEvidenceCommand = se_CompleteEvidenceCommand;
31
33
  const se_PresignEvidenceCommand = async (input, context) => {
32
34
  const b = (0, core_2.requestBuilder)(input, context);
33
- const headers = {
35
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
34
36
  'content-type': 'application/json',
35
- };
37
+ [_xop]: input[_cP],
38
+ [_xoav]: input[_cAV],
39
+ });
36
40
  b.bp("/api/p/{service}/{stage}/moderation/evidence/presign");
37
41
  b.p('service', () => input.service, '{service}', false);
38
42
  b.p('stage', () => input.stage, '{stage}', false);
@@ -236,3 +240,7 @@ const deserializeMetadata = (output) => ({
236
240
  cfId: output.headers["x-amz-cf-id"],
237
241
  });
238
242
  const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
243
+ const _cAV = "clientAppVersion";
244
+ const _cP = "clientPlatform";
245
+ const _xoav = "x-onehook-app-version";
246
+ const _xop = "x-onehook-platform";
@@ -2,12 +2,14 @@ import { ModerationEvidenceServiceServiceException as __BaseException } from "..
2
2
  import { BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PayloadTooLargeError, ServiceUnavailableError, TooManyRequestsError, } from "../models/models_0";
3
3
  import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
4
4
  import { requestBuilder as rb } from "@smithy/core";
5
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, isSerializableHeaderValue, map, take, withBaseException, } from "@smithy/smithy-client";
6
6
  export const se_CompleteEvidenceCommand = async (input, context) => {
7
7
  const b = rb(input, context);
8
- const headers = {
8
+ const headers = map({}, isSerializableHeaderValue, {
9
9
  'content-type': 'application/json',
10
- };
10
+ [_xop]: input[_cP],
11
+ [_xoav]: input[_cAV],
12
+ });
11
13
  b.bp("/api/p/{service}/{stage}/moderation/evidence/complete");
12
14
  b.p('service', () => input.service, '{service}', false);
13
15
  b.p('stage', () => input.stage, '{stage}', false);
@@ -26,9 +28,11 @@ export const se_CompleteEvidenceCommand = async (input, context) => {
26
28
  };
27
29
  export const se_PresignEvidenceCommand = async (input, context) => {
28
30
  const b = rb(input, context);
29
- const headers = {
31
+ const headers = map({}, isSerializableHeaderValue, {
30
32
  'content-type': 'application/json',
31
- };
33
+ [_xop]: input[_cP],
34
+ [_xoav]: input[_cAV],
35
+ });
32
36
  b.bp("/api/p/{service}/{stage}/moderation/evidence/presign");
33
37
  b.p('service', () => input.service, '{service}', false);
34
38
  b.p('stage', () => input.stage, '{stage}', false);
@@ -229,3 +233,7 @@ const deserializeMetadata = (output) => ({
229
233
  cfId: output.headers["x-amz-cf-id"],
230
234
  });
231
235
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
236
+ const _cAV = "clientAppVersion";
237
+ const _cP = "clientPlatform";
238
+ const _xoav = "x-onehook-app-version";
239
+ const _xop = "x-onehook-platform";
@@ -50,6 +50,8 @@ declare const CompleteEvidenceCommand_base: {
50
50
  * const input = { // CompleteEvidenceRequest
51
51
  * service: "STRING_VALUE", // required
52
52
  * stage: "STRING_VALUE", // required
53
+ * clientPlatform: "STRING_VALUE",
54
+ * clientAppVersion: "STRING_VALUE",
53
55
  * reportId: "STRING_VALUE", // required
54
56
  * evidenceId: "STRING_VALUE", // required
55
57
  * messageIds: [ // MessageIdList // required
@@ -49,6 +49,8 @@ declare const PresignEvidenceCommand_base: {
49
49
  * const input = { // PresignEvidenceRequest
50
50
  * service: "STRING_VALUE", // required
51
51
  * stage: "STRING_VALUE", // required
52
+ * clientPlatform: "STRING_VALUE",
53
+ * clientAppVersion: "STRING_VALUE",
52
54
  * reportId: "STRING_VALUE", // required
53
55
  * sizeBytes: Number("long"), // required
54
56
  * sha256: "STRING_VALUE", // required
@@ -48,6 +48,17 @@ export interface CompleteEvidenceRequest {
48
48
  * @public
49
49
  */
50
50
  stage: string;
51
+ /**
52
+ * `ios` or `android` from the native apps; absent from the web client. Needed only when the
53
+ * feature's app access is app-only.
54
+ * @public
55
+ */
56
+ clientPlatform?: string | undefined;
57
+ /**
58
+ * The app's marketing version, from the native apps.
59
+ * @public
60
+ */
61
+ clientAppVersion?: string | undefined;
51
62
  reportId: string;
52
63
  /**
53
64
  * From `PresignEvidence`.
@@ -220,6 +231,17 @@ export interface PresignEvidenceRequest {
220
231
  * @public
221
232
  */
222
233
  stage: string;
234
+ /**
235
+ * `ios` or `android` from the native apps; absent from the web client. Needed only when the
236
+ * feature's app access is app-only.
237
+ * @public
238
+ */
239
+ clientPlatform?: string | undefined;
240
+ /**
241
+ * The app's marketing version, from the native apps.
242
+ * @public
243
+ */
244
+ clientAppVersion?: string | undefined;
223
245
  /**
224
246
  * The report the evidence belongs to (State's reportId).
225
247
  * @public
@@ -1,6 +1,7 @@
1
1
  // GENERATED FILE - DO NOT EDIT.
2
2
  // Source of truth: OneHookAdminPortal/sdk/model/*.smithy, published as saha-equation-admin-portal-client.
3
- // Regenerate: (OneHookAdminPortal/sdk) npm run build && npm run manifest:sync
3
+ // Regenerate: (OneHookAdminPortal/sdk) npm run build && npm run manifest:sync.
4
+ // iOS / Android copies: pulled from saha-equation-admin-portal-client (manifest/) by OneHookPlatform scripts/sync-api-specs.mjs.
4
5
 
5
6
  @file:Suppress("unused")
6
7
 
@@ -1,6 +1,7 @@
1
1
  // GENERATED FILE - DO NOT EDIT.
2
2
  // Source of truth: OneHookAdminPortal/sdk/model/*.smithy, published as saha-equation-admin-portal-client.
3
- // Regenerate: (OneHookAdminPortal/sdk) npm run build && npm run manifest:sync
3
+ // Regenerate: (OneHookAdminPortal/sdk) npm run build && npm run manifest:sync.
4
+ // iOS / Android copies: pulled from saha-equation-admin-portal-client (manifest/) by OneHookPlatform scripts/sync-api-specs.mjs.
4
5
 
5
6
  import Foundation
6
7
 
@@ -39,6 +39,24 @@
39
39
  "description": "The service stage, e.g. `gamma`."
40
40
  },
41
41
  "required": true
42
+ },
43
+ {
44
+ "name": "X-OneHook-App-Version",
45
+ "in": "header",
46
+ "description": "The app's marketing version, from the native apps.",
47
+ "schema": {
48
+ "type": "string",
49
+ "description": "The app's marketing version, from the native apps."
50
+ }
51
+ },
52
+ {
53
+ "name": "X-OneHook-Platform",
54
+ "in": "header",
55
+ "description": "`ios` or `android` from the native apps; absent from the web client. Needed only when the\nfeature's app access is app-only.",
56
+ "schema": {
57
+ "type": "string",
58
+ "description": "`ios` or `android` from the native apps; absent from the web client. Needed only when the\nfeature's app access is app-only."
59
+ }
42
60
  }
43
61
  ],
44
62
  "responses": {
@@ -159,6 +177,24 @@
159
177
  "description": "The service stage, e.g. `gamma`."
160
178
  },
161
179
  "required": true
180
+ },
181
+ {
182
+ "name": "X-OneHook-App-Version",
183
+ "in": "header",
184
+ "description": "The app's marketing version, from the native apps.",
185
+ "schema": {
186
+ "type": "string",
187
+ "description": "The app's marketing version, from the native apps."
188
+ }
189
+ },
190
+ {
191
+ "name": "X-OneHook-Platform",
192
+ "in": "header",
193
+ "description": "`ios` or `android` from the native apps; absent from the web client. Needed only when the\nfeature's app access is app-only.",
194
+ "schema": {
195
+ "type": "string",
196
+ "description": "`ios` or `android` from the native apps; absent from the web client. Needed only when the\nfeature's app access is app-only."
197
+ }
162
198
  }
163
199
  ],
164
200
  "responses": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saha-equation-admin-portal-client",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "Generated TypeScript clients and route manifest for the admin portal's public feature APIs (moderation evidence, admissions), for any service the portal hosts.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "OneHook",