pierrejeambrun commented on code in PR #67908:
URL: https://github.com/apache/airflow/pull/67908#discussion_r3414088225


##########
ts-sdk/src/client-types.ts:
##########
@@ -0,0 +1,68 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/** JSON-compatible value accepted by Airflow for XCom payloads. */
+export type JsonValue =
+  | string
+  | number
+  | boolean
+  | null
+  | JsonValue[]
+  | { [key: string]: JsonValue };
+
+/**
+ * Options for pulling an XCom value.
+ *
+ * `dagId`, `taskId`, and `runId` default to the running task's context.
+ * Pass them only when pulling an XCom value from another task or run.
+ */
+export interface GetXComOpts {
+  key: string;
+  dagId?: string;
+  runId?: string;
+  taskId?: string;
+  mapIndex?: number | null;
+  includePriorDates?: boolean;
+}
+
+/**
+ * Options for pushing an XCom value.
+ *
+ * `dagId`, `taskId`, and `runId` default to the running task's context.
+ */
+export interface SetXComOpts {
+  key: string;
+  value: JsonValue;
+  dagId?: string;
+  runId?: string;
+  taskId?: string;
+  mapIndex?: number | null;
+}
+
+/** Airflow Connection details returned by a task client. */
+export interface ConnectionResult {
+  connId: string;
+  connType: string;

Review Comment:
   `connId`/`connType` diverge slightly from the sibling SDKs — Java's 
`Connection` uses `id`/`type`, Go's uses `ID`/`Type`. The 
camelCase-of-the-wire-name reads clearly on its own so I don't feel strongly, 
but aligning to id/type is probably better



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to