Remove Activation_Last_Attempt_At__c field from Salesforce order schema and related utility functions to streamline order data structure. Update buildInClause function to format output with parentheses for improved query syntax.

This commit is contained in:
barsa 2025-10-21 10:19:30 +09:00
parent 8a90003075
commit 7ffd2d562f
6 changed files with 10 additions and 7 deletions

View File

@ -29,7 +29,6 @@ export function buildOrderSelectFields(
"Activation_Scheduled_At__c",
"Activation_Error_Code__c",
"Activation_Error_Message__c",
"Activation_Last_Attempt_At__c",
"ActivatedDate",
"Internet_Plan_Tier__c",
"Installment_Plan__c",
@ -88,4 +87,3 @@ export function buildOrderItemProduct2Fields(
return UNIQUE([...fields, ...additional]);
}

View File

@ -46,5 +46,5 @@ export function buildInClause(values: string[], contextLabel: string): string {
}
});
return sanitized.join(", ");
return `(${sanitized.join(", ")})`;
}

View File

@ -30,7 +30,6 @@ export declare const salesforceOrderRecordSchema: z.ZodObject<{
Activation_Scheduled_At__c: z.ZodOptional<z.ZodNullable<z.ZodString>>;
Activation_Error_Code__c: z.ZodOptional<z.ZodNullable<z.ZodString>>;
Activation_Error_Message__c: z.ZodOptional<z.ZodNullable<z.ZodString>>;
Activation_Last_Attempt_At__c: z.ZodOptional<z.ZodNullable<z.ZodString>>;
ActivatedDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
Internet_Plan_Tier__c: z.ZodOptional<z.ZodNullable<z.ZodString>>;
Installment_Plan__c: z.ZodOptional<z.ZodNullable<z.ZodString>>;

View File

@ -30,7 +30,6 @@ exports.salesforceOrderRecordSchema = zod_1.z.object({
Activation_Scheduled_At__c: zod_1.z.string().nullable().optional(),
Activation_Error_Code__c: zod_1.z.string().nullable().optional(),
Activation_Error_Message__c: zod_1.z.string().nullable().optional(),
Activation_Last_Attempt_At__c: zod_1.z.string().nullable().optional(),
ActivatedDate: zod_1.z.string().nullable().optional(),
Internet_Plan_Tier__c: zod_1.z.string().nullable().optional(),
Installment_Plan__c: zod_1.z.string().nullable().optional(),
@ -98,4 +97,4 @@ exports.salesforcePubSubCallbackSchema = zod_1.z.object({
zod_1.z.null(),
]),
});
//# sourceMappingURL=raw.types.js.map
//# sourceMappingURL=raw.types.js.map

View File

@ -50,7 +50,6 @@ export const salesforceOrderRecordSchema = z.object({
Activation_Scheduled_At__c: z.string().nullable().optional(),
Activation_Error_Code__c: z.string().nullable().optional(),
Activation_Error_Message__c: z.string().nullable().optional(),
Activation_Last_Attempt_At__c: z.string().nullable().optional(),
ActivatedDate: z.string().nullable().optional(),
// Internet fields

View File

@ -104,6 +104,13 @@ export const simFeaturesUpdateRequestSchema = z.object({
networkType: z.enum(["4G", "5G"]).optional(),
});
export const simReissueRequestSchema = z.object({
newEid: z
.string()
.regex(/^\d{32}$/, "EID must be exactly 32 digits")
.optional(),
});
// ============================================================================
// SIM Order Activation Schemas
// ============================================================================
@ -194,3 +201,4 @@ export type SimPlanChangeRequest = z.infer<typeof simPlanChangeRequestSchema>;
export type SimCancelRequest = z.infer<typeof simCancelRequestSchema>;
export type SimTopUpHistoryRequest = z.infer<typeof simTopUpHistoryRequestSchema>;
export type SimFeaturesUpdateRequest = z.infer<typeof simFeaturesUpdateRequestSchema>;
export type SimReissueRequest = z.infer<typeof simReissueRequestSchema>;