@aurora-interactive/fankare-api-sdk 0.1.3 → 0.1.4

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 (34) hide show
  1. package/README.md +2 -0
  2. package/esm/funcs/posts-confirm-asset-upload.d.ts +16 -0
  3. package/esm/funcs/posts-confirm-asset-upload.d.ts.map +1 -0
  4. package/esm/funcs/posts-confirm-asset-upload.js +94 -0
  5. package/esm/funcs/posts-confirm-asset-upload.js.map +1 -0
  6. package/esm/funcs/posts-update-post.d.ts +1 -1
  7. package/esm/funcs/posts-update-post.js +1 -1
  8. package/esm/lib/config.d.ts +2 -2
  9. package/esm/lib/config.js +2 -2
  10. package/esm/models/media-asset.d.ts +2 -1
  11. package/esm/models/media-asset.d.ts.map +1 -1
  12. package/esm/models/media-asset.js +1 -0
  13. package/esm/models/media-asset.js.map +1 -1
  14. package/esm/models/operations/confirm-asset-upload.d.ts +14 -0
  15. package/esm/models/operations/confirm-asset-upload.d.ts.map +1 -0
  16. package/esm/models/operations/confirm-asset-upload.js +14 -0
  17. package/esm/models/operations/confirm-asset-upload.js.map +1 -0
  18. package/esm/models/operations/index.d.ts +1 -0
  19. package/esm/models/operations/index.d.ts.map +1 -1
  20. package/esm/models/operations/index.js +1 -0
  21. package/esm/models/operations/index.js.map +1 -1
  22. package/esm/sdk/posts.d.ts +8 -1
  23. package/esm/sdk/posts.d.ts.map +1 -1
  24. package/esm/sdk/posts.js +11 -1
  25. package/esm/sdk/posts.js.map +1 -1
  26. package/jsr.json +1 -1
  27. package/package.json +1 -1
  28. package/src/funcs/posts-confirm-asset-upload.ts +184 -0
  29. package/src/funcs/posts-update-post.ts +1 -1
  30. package/src/lib/config.ts +2 -2
  31. package/src/models/media-asset.ts +2 -1
  32. package/src/models/operations/confirm-asset-upload.ts +34 -0
  33. package/src/models/operations/index.ts +1 -0
  34. package/src/sdk/posts.ts +21 -1
package/README.md CHANGED
@@ -211,6 +211,7 @@ run();
211
211
  * [getPostComments](docs/sdks/posts/README.md#getpostcomments) - Fetch paginated comments for a post
212
212
  * [createComment](docs/sdks/posts/README.md#createcomment) - Add a comment to a post
213
213
  * [deleteComment](docs/sdks/posts/README.md#deletecomment) - Delete a comment from a post
214
+ * [confirmAssetUpload](docs/sdks/posts/README.md#confirmassetupload) - Confirm media upload and initiate processing
214
215
  * [getCollectionFeed](docs/sdks/posts/README.md#getcollectionfeed) - Get a timeline filtered strictly by members of this collection with pagination
215
216
 
216
217
  ### [Subscriptions](docs/sdks/subscriptions/README.md)
@@ -270,6 +271,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
270
271
  - [`notificationsGetNotifications`](docs/sdks/notifications/README.md#getnotifications) - Fetch a paginated feed of notifications for the authenticated user
271
272
  - [`notificationsGetUnreadNotificationCount`](docs/sdks/notifications/README.md#getunreadnotificationcount) - Fetch the count of unread notifications for the authenticated user
272
273
  - [`notificationsMarkNotificationsAsRead`](docs/sdks/notifications/README.md#marknotificationsasread) - Mark notifications as read
274
+ - [`postsConfirmAssetUpload`](docs/sdks/posts/README.md#confirmassetupload) - Confirm media upload and initiate processing
273
275
  - [`postsCreateComment`](docs/sdks/posts/README.md#createcomment) - Add a comment to a post
274
276
  - [`postsCreatePost`](docs/sdks/posts/README.md#createpost) - Initiate a new post: reserve asset slots and receive presigned upload URLs
275
277
  - [`postsDeleteComment`](docs/sdks/posts/README.md#deletecomment) - Delete a comment from a post
@@ -0,0 +1,16 @@
1
+ import { FankareSDKCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { FankareSDKError } from "../models/errors/fankare-sdk-error.js";
4
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
5
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
6
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
7
+ import { APIPromise } from "../types/async.js";
8
+ import { Result } from "../types/fp.js";
9
+ /**
10
+ * Confirm media upload and initiate processing
11
+ *
12
+ * @remarks
13
+ * Called by the client to signal that the raw media file has been successfully uploaded to the presigned PUT URL. This transitions the asset status from AWAITING_UPLOAD to PROCESSING and enqueues the background Celery job for media processing.
14
+ */
15
+ export declare function postsConfirmAssetUpload(client: FankareSDKCore, postId: number, assetId: number, options?: RequestOptions): APIPromise<Result<void, FankareSDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
16
+ //# sourceMappingURL=posts-confirm-asset-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posts-confirm-asset-upload.d.ts","sourceRoot":"","sources":["../../src/funcs/posts-confirm-asset-upload.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAM5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAE9E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,IAAI,EACF,eAAe,GACf,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAOA"}
@@ -0,0 +1,94 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: f6e58e6f1bf8
4
+ */
5
+ import * as z from "zod/v4-mini";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as operations from "../models/operations/index.js";
14
+ import { APIPromise } from "../types/async.js";
15
+ /**
16
+ * Confirm media upload and initiate processing
17
+ *
18
+ * @remarks
19
+ * Called by the client to signal that the raw media file has been successfully uploaded to the presigned PUT URL. This transitions the asset status from AWAITING_UPLOAD to PROCESSING and enqueues the background Celery job for media processing.
20
+ */
21
+ export function postsConfirmAssetUpload(client, postId, assetId, options) {
22
+ return new APIPromise($do(client, postId, assetId, options));
23
+ }
24
+ async function $do(client, postId, assetId, options) {
25
+ const input = {
26
+ postId: postId,
27
+ assetId: assetId,
28
+ };
29
+ const parsed = safeParse(input, (value) => z.parse(operations.ConfirmAssetUploadRequest$outboundSchema, value), "Input validation failed");
30
+ if (!parsed.ok) {
31
+ return [parsed, { status: "invalid" }];
32
+ }
33
+ const payload = parsed.value;
34
+ const body = null;
35
+ const pathParams = {
36
+ assetId: encodeSimple("assetId", payload.assetId, {
37
+ explode: false,
38
+ charEncoding: "percent",
39
+ }),
40
+ postId: encodeSimple("postId", payload.postId, {
41
+ explode: false,
42
+ charEncoding: "percent",
43
+ }),
44
+ };
45
+ const path = pathToFunc("/posts/{postId}/assets/{assetId}/confirm-upload")(pathParams);
46
+ const headers = new Headers(compactMap({
47
+ Accept: "*/*",
48
+ }));
49
+ const secConfig = await extractSecurity(client._options.bearerAuth);
50
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
51
+ const requestSecurity = resolveGlobalSecurity(securityInput);
52
+ const context = {
53
+ options: client._options,
54
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
55
+ operationID: "confirmAssetUpload",
56
+ oAuth2Scopes: null,
57
+ resolvedSecurity: requestSecurity,
58
+ securitySource: client._options.bearerAuth,
59
+ retryConfig: options?.retries
60
+ || client._options.retryConfig
61
+ || { strategy: "none" },
62
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
63
+ };
64
+ const requestRes = client._createRequest(context, {
65
+ security: requestSecurity,
66
+ method: "POST",
67
+ baseURL: options?.serverURL,
68
+ path: path,
69
+ headers: headers,
70
+ body: body,
71
+ userAgent: client._options.userAgent,
72
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
73
+ }, options);
74
+ if (!requestRes.ok) {
75
+ return [requestRes, { status: "invalid" }];
76
+ }
77
+ const req = requestRes.value;
78
+ const doResult = await client._do(req, {
79
+ context,
80
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
81
+ retryConfig: context.retryConfig,
82
+ retryCodes: context.retryCodes,
83
+ });
84
+ if (!doResult.ok) {
85
+ return [doResult, { status: "request-error", request: req }];
86
+ }
87
+ const response = doResult.value;
88
+ const [result] = await M.match(M.nil(204, z.void()), M.fail([401, 403, 404, 409, "4XX"]), M.fail("5XX"))(response, req);
89
+ if (!result.ok) {
90
+ return [result, { status: "complete", request: req, response }];
91
+ }
92
+ return [result, { status: "complete", request: req, response }];
93
+ }
94
+ //# sourceMappingURL=posts-confirm-asset-upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posts-confirm-asset-upload.js","sourceRoot":"","sources":["../../src/funcs/posts-confirm-asset-upload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,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CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAA,CACjE"}
@@ -11,7 +11,7 @@ import { Result } from "../types/fp.js";
11
11
  * Publish or update a post
12
12
  *
13
13
  * @remarks
14
- * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in PROCESSING state cannot be published.
14
+ * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in AWAITING_UPLOAD or PROCESSING state cannot be published.
15
15
  */
16
16
  export declare function postsUpdatePost(client: FankareSDKCore, postId: number, body: models.UpdatePostRequest, options?: RequestOptions): APIPromise<Result<models.Post, FankareSDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
17
17
  //# sourceMappingURL=posts-update-post.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Publish or update a post
18
18
  *
19
19
  * @remarks
20
- * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in PROCESSING state cannot be published.
20
+ * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in AWAITING_UPLOAD or PROCESSING state cannot be published.
21
21
  */
22
22
  export function postsUpdatePost(client, postId, body, options) {
23
23
  return new APIPromise($do(client, postId, body, options));
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
31
31
  export declare const SDK_METADATA: {
32
32
  readonly language: "typescript";
33
33
  readonly openapiDocVersion: "1.1.0";
34
- readonly sdkVersion: "0.1.3";
34
+ readonly sdkVersion: "0.1.4";
35
35
  readonly genVersion: "2.911.0";
36
- readonly userAgent: "speakeasy-sdk/typescript 0.1.3 2.911.0 1.1.0 openapi";
36
+ readonly userAgent: "speakeasy-sdk/typescript 0.1.4 2.911.0 1.1.0 openapi";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -28,8 +28,8 @@ export function serverURLFromOptions(options) {
28
28
  export const SDK_METADATA = {
29
29
  language: "typescript",
30
30
  openapiDocVersion: "1.1.0",
31
- sdkVersion: "0.1.3",
31
+ sdkVersion: "0.1.4",
32
32
  genVersion: "2.911.0",
33
- userAgent: "speakeasy-sdk/typescript 0.1.3 2.911.0 1.1.0 openapi",
33
+ userAgent: "speakeasy-sdk/typescript 0.1.4 2.911.0 1.1.0 openapi",
34
34
  };
35
35
  //# sourceMappingURL=config.js.map
@@ -8,6 +8,7 @@ export declare const MediaAssetMediaType: {
8
8
  };
9
9
  export type MediaAssetMediaType = OpenEnum<typeof MediaAssetMediaType>;
10
10
  export declare const MediaAssetStatus: {
11
+ readonly AwaitingUpload: "AWAITING_UPLOAD";
11
12
  readonly Processing: "PROCESSING";
12
13
  readonly Ready: "READY";
13
14
  readonly Failed: "FAILED";
@@ -16,7 +17,7 @@ export type MediaAssetStatus = OpenEnum<typeof MediaAssetStatus>;
16
17
  export type MediaAsset = {
17
18
  id?: number | undefined;
18
19
  /**
19
- * Fully qualified URL to the processed output file in SeaweedFS. Null while the asset is still PROCESSING.
20
+ * Fully qualified URL to the processed output file in SeaweedFS. Null while the asset is still AWAITING_UPLOAD or PROCESSING.
20
21
  */
21
22
  mediaUrl?: string | null | undefined;
22
23
  mediaType?: MediaAssetMediaType | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"media-asset.d.ts","sourceRoot":"","sources":["../../src/models/media-asset.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEvE,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEjE,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,SAAS,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,MAAM,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,WAAW,CAC3D,mBAAmB,EACnB,OAAO,CACuC,CAAC;AAEjD,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,WAAW,CACxD,gBAAgB,EAChB,OAAO,CACoC,CAAC;AAE9C,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,OAA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,WAAW,CAAC,UAAU,EAAE,OAAO,CAOpE,CAAC;AAEL,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAMjD"}
@@ -11,6 +11,7 @@ export const MediaAssetMediaType = {
11
11
  Video: "VIDEO",
12
12
  };
13
13
  export const MediaAssetStatus = {
14
+ AwaitingUpload: "AWAITING_UPLOAD",
14
15
  Processing: "PROCESSING",
15
16
  Ready: "READY",
16
17
  Failed: "FAILED",
@@ -1 +1 @@
1
- {"version":3,"file":"media-asset.js","sourceRoot":"","sources":["../../src/models/media-asset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAGhD,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACN,CAAC;AAGX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACR,CAAC;AAiBX,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAG1C,SAAS,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;AAEjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAGvC,SAAS,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;AAE9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GAAuC,CAAC;KAC1E,MAAM,CAAC;IACN,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,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C,MAAM,wBAAwB,GAAuC,CAAC;KAC1E,MAAM,CAAC;IACN,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC5D,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACtD,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC;AAEL,MAAM,UAAU,kBAAkB,CAChC,UAAkB,EAC+B;IACjD,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,wBAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpD,wCAAwC,CACzC,CAAC;AAAA,CACH"}
@@ -0,0 +1,14 @@
1
+ import * as z from "zod/v4-mini";
2
+ export type ConfirmAssetUploadRequest = {
3
+ postId: number;
4
+ assetId: number;
5
+ };
6
+ /** @internal */
7
+ export type ConfirmAssetUploadRequest$Outbound = {
8
+ postId: number;
9
+ assetId: number;
10
+ };
11
+ /** @internal */
12
+ export declare const ConfirmAssetUploadRequest$outboundSchema: z.ZodMiniType<ConfirmAssetUploadRequest$Outbound, ConfirmAssetUploadRequest>;
13
+ export declare function confirmAssetUploadRequestToJSON(confirmAssetUploadRequest: ConfirmAssetUploadRequest): string;
14
+ //# sourceMappingURL=confirm-asset-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-asset-upload.d.ts","sourceRoot":"","sources":["../../../src/models/operations/confirm-asset-upload.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,WAAW,CAClE,kCAAkC,EAClC,yBAAyB,CAIzB,CAAC;AAEH,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 9c419477b6bc
4
+ */
5
+ import * as z from "zod/v4-mini";
6
+ /** @internal */
7
+ export const ConfirmAssetUploadRequest$outboundSchema = z.object({
8
+ postId: z.int(),
9
+ assetId: z.int(),
10
+ });
11
+ export function confirmAssetUploadRequestToJSON(confirmAssetUploadRequest) {
12
+ return JSON.stringify(ConfirmAssetUploadRequest$outboundSchema.parse(confirmAssetUploadRequest));
13
+ }
14
+ //# sourceMappingURL=confirm-asset-upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-asset-upload.js","sourceRoot":"","sources":["../../../src/models/operations/confirm-asset-upload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAajC,gBAAgB;AAChB,MAAM,CAAC,MAAM,wCAAwC,GAGjD,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE;IACf,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE;CACjB,CAAC,CAAC;AAEH,MAAM,UAAU,+BAA+B,CAC7C,yBAAoD,EAC5C;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AAAA,CACH"}
@@ -1,5 +1,6 @@
1
1
  export * from "./add-collection-member.js";
2
2
  export * from "./asset-processing-callback.js";
3
+ export * from "./confirm-asset-upload.js";
3
4
  export * from "./create-collection.js";
4
5
  export * from "./create-comment.js";
5
6
  export * from "./delete-collection.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/operations/index.ts"],"names":[],"mappings":"AAKA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/operations/index.ts"],"names":[],"mappings":"AAKA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC"}
@@ -4,6 +4,7 @@
4
4
  */
5
5
  export * from "./add-collection-member.js";
6
6
  export * from "./asset-processing-callback.js";
7
+ export * from "./confirm-asset-upload.js";
7
8
  export * from "./create-collection.js";
8
9
  export * from "./create-comment.js";
9
10
  export * from "./delete-collection.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/operations/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kB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,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC"}
@@ -20,7 +20,7 @@ export declare class Posts extends ClientSDK {
20
20
  * Publish or update a post
21
21
  *
22
22
  * @remarks
23
- * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in PROCESSING state cannot be published.
23
+ * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in AWAITING_UPLOAD or PROCESSING state cannot be published.
24
24
  */
25
25
  updatePost(postId: number, body: models.UpdatePostRequest, options?: RequestOptions): Promise<models.Post>;
26
26
  /**
@@ -51,6 +51,13 @@ export declare class Posts extends ClientSDK {
51
51
  * Delete a comment from a post
52
52
  */
53
53
  deleteComment(postId: number, commentId: number, options?: RequestOptions): Promise<void>;
54
+ /**
55
+ * Confirm media upload and initiate processing
56
+ *
57
+ * @remarks
58
+ * Called by the client to signal that the raw media file has been successfully uploaded to the presigned PUT URL. This transitions the asset status from AWAITING_UPLOAD to PROCESSING and enqueues the background Celery job for media processing.
59
+ */
60
+ confirmAssetUpload(postId: number, assetId: number, options?: RequestOptions): Promise<void>;
54
61
  /**
55
62
  * Get a timeline filtered strictly by members of this collection with pagination
56
63
  */
@@ -1 +1 @@
1
- {"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../../src/sd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;;OAEG;IACG,aAAa,CACjB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,CAAC,oBAAoB,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAOzB;IAED;;OAEG;IACG,aAAa,CACjB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAOf;IAED;;;;;OAKG;IACG,kBAAkB,CACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAOf;IAED;;OAEG;IACG,iBAAiB,CACrB,YAAY,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAQxC;CACF"}
package/esm/sdk/posts.js CHANGED
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  * @generated-id: 6787631da7f6
4
4
  */
5
+ import { postsConfirmAssetUpload } from "../funcs/posts-confirm-asset-upload.js";
5
6
  import { postsCreateComment } from "../funcs/posts-create-comment.js";
6
7
  import { postsCreatePost } from "../funcs/posts-create-post.js";
7
8
  import { postsDeleteComment } from "../funcs/posts-delete-comment.js";
@@ -42,7 +43,7 @@ export class Posts extends ClientSDK {
42
43
  * Publish or update a post
43
44
  *
44
45
  * @remarks
45
- * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in PROCESSING state cannot be published.
46
+ * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in AWAITING_UPLOAD or PROCESSING state cannot be published.
46
47
  */
47
48
  async updatePost(postId, body, options) {
48
49
  return unwrapAsync(postsUpdatePost(this, postId, body, options));
@@ -89,6 +90,15 @@ export class Posts extends ClientSDK {
89
90
  async deleteComment(postId, commentId, options) {
90
91
  return unwrapAsync(postsDeleteComment(this, postId, commentId, options));
91
92
  }
93
+ /**
94
+ * Confirm media upload and initiate processing
95
+ *
96
+ * @remarks
97
+ * Called by the client to signal that the raw media file has been successfully uploaded to the presigned PUT URL. This transitions the asset status from AWAITING_UPLOAD to PROCESSING and enqueues the background Celery job for media processing.
98
+ */
99
+ async confirmAssetUpload(postId, assetId, options) {
100
+ return unwrapAsync(postsConfirmAssetUpload(this, postId, assetId, options));
101
+ }
92
102
  /**
93
103
  * Get a timeline filtered strictly by members of this collection with pagination
94
104
  */
@@ -1 +1 @@
1
- {"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/sdk/posts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO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IAAA,CACJ;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ,CACZ,MAAc,EACd,OAAwB,EACT;QACf,OAAO,WAAW,CAAC,aAAa,CAC9B,IAAI,EACJ,MAAM,EACN,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CACd,MAAc,EACd,OAAwB,EACT;QACf,OAAO,WAAW,CAAC,eAAe,CAChC,IAAI,EACJ,MAAM,EACN,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;OAEG;IACH,KAAK,CAAC,eAAe,CACnB,MAAc,EACd,KAA0B,EAC1B,MAA2B,EAC3B,OAAwB,EACmB;QAC3C,OAAO,WAAW,CAAC,oBAAoB,CACrC,IAAI,EACJ,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;OAEG;IACH,KAAK,CAAC,aAAa,CACjB,MAAc,EACd,IAAiC,EACjC,OAAwB,EACC;QACzB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;OAEG;IACH,KAAK,CAAC,aAAa,CACjB,MAAc,EACd,SAAiB,EACjB,OAAwB,EACT;QACf,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,MAAM,EACN,SAAS,EACT,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB,CACrB,YAAoB,EACpB,KAA0B,EAC1B,MAA2B,EAC3B,OAAwB,EACgB;QACxC,OAAO,WAAW,CAAC,sBAAsB,CACvC,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
1
+ {"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/sdk/posts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA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,EACC;QACzB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;OAEG;IACH,KAAK,CAAC,aAAa,CACjB,MAAc,EACd,SAAiB,EACjB,OAAwB,EACT;QACf,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,MAAM,EACN,SAAS,EACT,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;;;;OAKG;IACH,KAAK,CAAC,kBAAkB,CACtB,MAAc,EACd,OAAe,EACf,OAAwB,EACT;QACf,OAAO,WAAW,CAAC,uBAAuB,CACxC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB,CACrB,YAAoB,EACpB,KAA0B,EAC1B,MAA2B,EAC3B,OAAwB,EACgB;QACxC,OAAO,WAAW,CAAC,sBAAsB,CACvC,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,OAAO,CACR,CAAC,CAAC;IAAA,CACJ;CACF"}
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@aurora-interactive/fankare-api-sdk",
5
- "version": "0.1.3",
5
+ "version": "0.1.4",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurora-interactive/fankare-api-sdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "author": "Aurora Interactive",
5
5
  "type": "module",
6
6
  "main": "./esm/index.js",
@@ -0,0 +1,184 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: f6e58e6f1bf8
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+ import { FankareSDKCore } from "../core.js";
8
+ import { encodeSimple } from "../lib/encodings.js";
9
+ import { matchStatusCode } from "../lib/http.js";
10
+ import * as M from "../lib/matchers.js";
11
+ import { compactMap } from "../lib/primitives.js";
12
+ import { safeParse } from "../lib/schemas.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
15
+ import { pathToFunc } from "../lib/url.js";
16
+ import { FankareSDKError } from "../models/errors/fankare-sdk-error.js";
17
+ import {
18
+ ConnectionError,
19
+ InvalidRequestError,
20
+ RequestAbortedError,
21
+ RequestTimeoutError,
22
+ UnexpectedClientError,
23
+ } from "../models/errors/http-client-errors.js";
24
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
25
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { APICall, APIPromise } from "../types/async.js";
28
+ import { Result } from "../types/fp.js";
29
+
30
+ /**
31
+ * Confirm media upload and initiate processing
32
+ *
33
+ * @remarks
34
+ * Called by the client to signal that the raw media file has been successfully uploaded to the presigned PUT URL. This transitions the asset status from AWAITING_UPLOAD to PROCESSING and enqueues the background Celery job for media processing.
35
+ */
36
+ export function postsConfirmAssetUpload(
37
+ client: FankareSDKCore,
38
+ postId: number,
39
+ assetId: number,
40
+ options?: RequestOptions,
41
+ ): APIPromise<
42
+ Result<
43
+ void,
44
+ | FankareSDKError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ postId,
57
+ assetId,
58
+ options,
59
+ ));
60
+ }
61
+
62
+ async function $do(
63
+ client: FankareSDKCore,
64
+ postId: number,
65
+ assetId: number,
66
+ options?: RequestOptions,
67
+ ): Promise<
68
+ [
69
+ Result<
70
+ void,
71
+ | FankareSDKError
72
+ | ResponseValidationError
73
+ | ConnectionError
74
+ | RequestAbortedError
75
+ | RequestTimeoutError
76
+ | InvalidRequestError
77
+ | UnexpectedClientError
78
+ | SDKValidationError
79
+ >,
80
+ APICall,
81
+ ]
82
+ > {
83
+ const input: operations.ConfirmAssetUploadRequest = {
84
+ postId: postId,
85
+ assetId: assetId,
86
+ };
87
+
88
+ const parsed = safeParse(
89
+ input,
90
+ (value) =>
91
+ z.parse(operations.ConfirmAssetUploadRequest$outboundSchema, value),
92
+ "Input validation failed",
93
+ );
94
+ if (!parsed.ok) {
95
+ return [parsed, { status: "invalid" }];
96
+ }
97
+ const payload = parsed.value;
98
+ const body = null;
99
+
100
+ const pathParams = {
101
+ assetId: encodeSimple("assetId", payload.assetId, {
102
+ explode: false,
103
+ charEncoding: "percent",
104
+ }),
105
+ postId: encodeSimple("postId", payload.postId, {
106
+ explode: false,
107
+ charEncoding: "percent",
108
+ }),
109
+ };
110
+ const path = pathToFunc("/posts/{postId}/assets/{assetId}/confirm-upload")(
111
+ pathParams,
112
+ );
113
+
114
+ const headers = new Headers(compactMap({
115
+ Accept: "*/*",
116
+ }));
117
+
118
+ const secConfig = await extractSecurity(client._options.bearerAuth);
119
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
120
+ const requestSecurity = resolveGlobalSecurity(securityInput);
121
+
122
+ const context = {
123
+ options: client._options,
124
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
125
+ operationID: "confirmAssetUpload",
126
+ oAuth2Scopes: null,
127
+
128
+ resolvedSecurity: requestSecurity,
129
+
130
+ securitySource: client._options.bearerAuth,
131
+ retryConfig: options?.retries
132
+ || client._options.retryConfig
133
+ || { strategy: "none" },
134
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
135
+ };
136
+
137
+ const requestRes = client._createRequest(context, {
138
+ security: requestSecurity,
139
+ method: "POST",
140
+ baseURL: options?.serverURL,
141
+ path: path,
142
+ headers: headers,
143
+ body: body,
144
+ userAgent: client._options.userAgent,
145
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
146
+ }, options);
147
+ if (!requestRes.ok) {
148
+ return [requestRes, { status: "invalid" }];
149
+ }
150
+ const req = requestRes.value;
151
+
152
+ const doResult = await client._do(req, {
153
+ context,
154
+ isErrorStatusCode: (statusCode: number) =>
155
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
156
+ retryConfig: context.retryConfig,
157
+ retryCodes: context.retryCodes,
158
+ });
159
+ if (!doResult.ok) {
160
+ return [doResult, { status: "request-error", request: req }];
161
+ }
162
+ const response = doResult.value;
163
+
164
+ const [result] = await M.match<
165
+ void,
166
+ | FankareSDKError
167
+ | ResponseValidationError
168
+ | ConnectionError
169
+ | RequestAbortedError
170
+ | RequestTimeoutError
171
+ | InvalidRequestError
172
+ | UnexpectedClientError
173
+ | SDKValidationError
174
+ >(
175
+ M.nil(204, z.void()),
176
+ M.fail([401, 403, 404, 409, "4XX"]),
177
+ M.fail("5XX"),
178
+ )(response, req);
179
+ if (!result.ok) {
180
+ return [result, { status: "complete", request: req, response }];
181
+ }
182
+
183
+ return [result, { status: "complete", request: req, response }];
184
+ }
@@ -32,7 +32,7 @@ import { Result } from "../types/fp.js";
32
32
  * Publish or update a post
33
33
  *
34
34
  * @remarks
35
- * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in PROCESSING state cannot be published.
35
+ * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in AWAITING_UPLOAD or PROCESSING state cannot be published.
36
36
  */
37
37
  export function postsUpdatePost(
38
38
  client: FankareSDKCore,
package/src/lib/config.ts CHANGED
@@ -62,7 +62,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
62
62
  export const SDK_METADATA = {
63
63
  language: "typescript",
64
64
  openapiDocVersion: "1.1.0",
65
- sdkVersion: "0.1.3",
65
+ sdkVersion: "0.1.4",
66
66
  genVersion: "2.911.0",
67
- userAgent: "speakeasy-sdk/typescript 0.1.3 2.911.0 1.1.0 openapi",
67
+ userAgent: "speakeasy-sdk/typescript 0.1.4 2.911.0 1.1.0 openapi",
68
68
  } as const;
@@ -18,6 +18,7 @@ export const MediaAssetMediaType = {
18
18
  export type MediaAssetMediaType = OpenEnum<typeof MediaAssetMediaType>;
19
19
 
20
20
  export const MediaAssetStatus = {
21
+ AwaitingUpload: "AWAITING_UPLOAD",
21
22
  Processing: "PROCESSING",
22
23
  Ready: "READY",
23
24
  Failed: "FAILED",
@@ -27,7 +28,7 @@ export type MediaAssetStatus = OpenEnum<typeof MediaAssetStatus>;
27
28
  export type MediaAsset = {
28
29
  id?: number | undefined;
29
30
  /**
30
- * Fully qualified URL to the processed output file in SeaweedFS. Null while the asset is still PROCESSING.
31
+ * Fully qualified URL to the processed output file in SeaweedFS. Null while the asset is still AWAITING_UPLOAD or PROCESSING.
31
32
  */
32
33
  mediaUrl?: string | null | undefined;
33
34
  mediaType?: MediaAssetMediaType | undefined;
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 9c419477b6bc
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+
8
+ export type ConfirmAssetUploadRequest = {
9
+ postId: number;
10
+ assetId: number;
11
+ };
12
+
13
+ /** @internal */
14
+ export type ConfirmAssetUploadRequest$Outbound = {
15
+ postId: number;
16
+ assetId: number;
17
+ };
18
+
19
+ /** @internal */
20
+ export const ConfirmAssetUploadRequest$outboundSchema: z.ZodMiniType<
21
+ ConfirmAssetUploadRequest$Outbound,
22
+ ConfirmAssetUploadRequest
23
+ > = z.object({
24
+ postId: z.int(),
25
+ assetId: z.int(),
26
+ });
27
+
28
+ export function confirmAssetUploadRequestToJSON(
29
+ confirmAssetUploadRequest: ConfirmAssetUploadRequest,
30
+ ): string {
31
+ return JSON.stringify(
32
+ ConfirmAssetUploadRequest$outboundSchema.parse(confirmAssetUploadRequest),
33
+ );
34
+ }
@@ -5,6 +5,7 @@
5
5
 
6
6
  export * from "./add-collection-member.js";
7
7
  export * from "./asset-processing-callback.js";
8
+ export * from "./confirm-asset-upload.js";
8
9
  export * from "./create-collection.js";
9
10
  export * from "./create-comment.js";
10
11
  export * from "./delete-collection.js";
package/src/sdk/posts.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  * @generated-id: 6787631da7f6
4
4
  */
5
5
 
6
+ import { postsConfirmAssetUpload } from "../funcs/posts-confirm-asset-upload.js";
6
7
  import { postsCreateComment } from "../funcs/posts-create-comment.js";
7
8
  import { postsCreatePost } from "../funcs/posts-create-post.js";
8
9
  import { postsDeleteComment } from "../funcs/posts-delete-comment.js";
@@ -71,7 +72,7 @@ export class Posts extends ClientSDK {
71
72
  * Publish or update a post
72
73
  *
73
74
  * @remarks
74
- * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in PROCESSING state cannot be published.
75
+ * Used to publish a DRAFT post once all asset uploads are complete, or to update the caption of an already-published post. Setting status to PUBLISHED triggers a server-side check that all required assets have been received by the object store before making the post visible in feeds. A post with assets still in AWAITING_UPLOAD or PROCESSING state cannot be published.
75
76
  */
76
77
  async updatePost(
77
78
  postId: number,
@@ -196,6 +197,25 @@ export class Posts extends ClientSDK {
196
197
  ));
197
198
  }
198
199
 
200
+ /**
201
+ * Confirm media upload and initiate processing
202
+ *
203
+ * @remarks
204
+ * Called by the client to signal that the raw media file has been successfully uploaded to the presigned PUT URL. This transitions the asset status from AWAITING_UPLOAD to PROCESSING and enqueues the background Celery job for media processing.
205
+ */
206
+ async confirmAssetUpload(
207
+ postId: number,
208
+ assetId: number,
209
+ options?: RequestOptions,
210
+ ): Promise<void> {
211
+ return unwrapAsync(postsConfirmAssetUpload(
212
+ this,
213
+ postId,
214
+ assetId,
215
+ options,
216
+ ));
217
+ }
218
+
199
219
  /**
200
220
  * Get a timeline filtered strictly by members of this collection with pagination
201
221
  */